remove body parser
This commit is contained in:
parent
1034e7b572
commit
568a032d84
|
@ -4,7 +4,6 @@
|
|||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.0",
|
||||
"deep-object-diff": "^1.1.0",
|
||||
"express": "^4.17.1",
|
||||
"http-status-codes": "^2.1.2",
|
||||
|
|
|
@ -5,7 +5,6 @@ if (!process.env.PORTAL_URL) {
|
|||
}
|
||||
|
||||
const express = require("express");
|
||||
const bodyparser = require("body-parser");
|
||||
const db = require("./db");
|
||||
|
||||
const host = process.env.HOSTNAME || "0.0.0.0";
|
||||
|
@ -13,8 +12,8 @@ const port = Number(process.env.PORT) || 3100;
|
|||
|
||||
const server = express();
|
||||
|
||||
server.use(bodyparser.urlencoded({ extended: false }));
|
||||
server.use(bodyparser.json());
|
||||
server.use(express.urlencoded({ extended: false }));
|
||||
server.use(express.json());
|
||||
server.use((req, res, next) => {
|
||||
db.read();
|
||||
next();
|
||||
|
|
Reference in New Issue