Skip to content

Commit

Permalink
deps: remove body-parser
Browse files Browse the repository at this point in the history
The functionality of body-parser we were using was merged into
expressjs.  This commit removes body-parser and replaces it with
expressjs's version.

Closes Third-Culture-Software#7124.
  • Loading branch information
jniles committed Aug 13, 2023
1 parent 4523166 commit 8180730
Show file tree
Hide file tree
Showing 3 changed files with 281 additions and 423 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"angular-translate-loader-url": "^2.19.0",
"angular-ui-bootstrap": "^2.5.6",
"angular-ui-grid": "^4.12.3",
"body-parser": "^1.20.2",
"bootstrap": "^3.3.0",
"chart.js": "^3.9.1",
"chartjs-plugin-datalabels": "^2.1.0",
Expand Down
5 changes: 2 additions & 3 deletions server/config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

const express = require('express');
const bodyParser = require('body-parser');
const session = require('express-session');
// NOTE: connect-redis now automatically imports the session data from
// express-session. See the migration notes in
Expand Down Expand Up @@ -42,8 +41,8 @@ exports.configure = function configure(app) {
},
}));

app.use(bodyParser.json({ limit : '8mb' }));
app.use(bodyParser.urlencoded({ extended : false }));
app.use(express.json({ limit : '8mb' }));
app.use(express.urlencoded({ extended : false }));

// this will disable the session from expiring on the server (redis-session)
// during development
Expand Down
Loading

0 comments on commit 8180730

Please sign in to comment.