Skip to content

Commit

Permalink
refactor: remove useless package body-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Sep 14, 2021
1 parent d311d00 commit d100302
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions hads.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const fs = require('fs-extra');
const path = require('path');
const express = require('express');
const multer = require('multer');
const bodyParser = require('body-parser');
const shortId = require('shortid');
const moment = require('moment');
const pkg = require('./package.json');
Expand Down Expand Up @@ -191,8 +190,8 @@ if (args.export) {
const app = express();
app.set('views', PATHS.views);
app.set('view engine', 'pug');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
app.use(express.json());
app.use(express.urlencoded({
extended: true
}));
app.use('/_hads/', express.static(path.join(__dirname, '/public')));
Expand Down
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
},
"dependencies": {
"ace-builds": "^1.4.11",
"body-parser": "^1.19.0",
"dropzone": "^5.7.0",
"elasticlunr": "^0.9.5",
"express": "^4.17.1",
Expand Down

0 comments on commit d100302

Please sign in to comment.