Skip to content

Commit

Permalink
add express.urlencoded as a middleware
Browse files Browse the repository at this point in the history
relates #37
  • Loading branch information
rehabas committed Mar 28, 2020
1 parent 21f816a commit 8d66c4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"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",
Expand Down
4 changes: 2 additions & 2 deletions server/app.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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);

app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(compression());
app.use('/api/v1/', controller);

Expand Down

0 comments on commit 8d66c4c

Please sign in to comment.