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