diff --git a/package.json b/package.json index 77d2f632..0a377503 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "dependencies": { "babel-jest": "^24.9.0", "bcrypt": "^4.0.1", + "body-parser": "^1.19.0", "compression": "^1.7.4", "cookie-parser": "^1.4.5", "dotenv": "^8.2.0", diff --git a/server/app.js b/server/app.js index 1dcebe81..236cb2fe 100644 --- a/server/app.js +++ b/server/app.js @@ -1,11 +1,12 @@ const express = require('express'); const compression = require('compression'); const { join } = require('path'); +const bodyParser = require('body-parser'); const controller = require('./controllers'); const app = express(); - +app.use(bodyParser.urlencoded({ extended: false })); app.disable('x-powered-by'); app.set('port', process.env.PORT || 5000);