diff --git a/app/package.json b/app/package.json index 7465cd0..b609496 100644 --- a/app/package.json +++ b/app/package.json @@ -9,7 +9,6 @@ "dev": "nodemon src/index.js" }, "dependencies": { - "body-parser": "^1.19.0", "express": "^4.17.1", "mysql": "^2.17.1", "sqlite3": "^4.1.0", diff --git a/app/src/index.js b/app/src/index.js index 3bd3906..7e8e772 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -6,7 +6,7 @@ const addItem = require('./routes/addItem'); const updateItem = require('./routes/updateItem'); const deleteItem = require('./routes/deleteItem'); -app.use(require('body-parser').json()); +app.use(express.json()); app.use(express.static(__dirname + '/static')); app.get('/items', getItems);