update all the deps

Fix #2
This commit is contained in:
DavidWells 2019-01-07 12:50:01 -08:00
parent d390d662a9
commit df6e425f9f
3 changed files with 27 additions and 16 deletions

View file

@ -3,10 +3,10 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"faunadb": "^0.2.2",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-scripts": "1.1.4"
"faunadb": "^2.5.2",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3"
},
"scripts": {
"bootstrap": "node ./scripts/bootstrap-fauna-database.js",
@ -22,16 +22,15 @@
"test": "react-scripts test --env=jsdom"
},
"devDependencies": {
"markdown-magic": "^0.1.23",
"netlify-lambda": "^0.4.0",
"npm-run-all": "^4.1.3"
"http-proxy-middleware": "^0.19.1",
"markdown-magic": "^0.1.25",
"netlify-lambda": "^1.1.1",
"npm-run-all": "^4.1.5"
},
"proxy": {
"/.netlify/functions": {
"target": "http://localhost:9000",
"pathRewrite": {
"^/\\.netlify/functions": ""
}
}
}
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

View file

@ -324,5 +324,5 @@ function getTodoId(todo) {
if (!todo.ref) {
return null
}
return todo.ref['@ref'].split('/').pop()
return todo.ref['@ref'].id
}

12
src/setupProxy.js Normal file
View file

@ -0,0 +1,12 @@
const proxy = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
proxy('/.netlify/functions/', {
target: 'http://localhost:9000/',
pathRewrite: {
'^/\\.netlify/functions': ''
}
})
);
};