mirror of
https://github.com/directus/directus.git
synced 2026-01-26 10:17:57 -05:00
Install body parser
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.17.1",
|
||||
"express-async-handler": "^1.1.4",
|
||||
|
||||
@@ -2,9 +2,10 @@ import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
|
||||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import { errorHandler } from './error';
|
||||
import itemsRouter from './routes/items';
|
||||
|
||||
const app = express().use('/items', itemsRouter).use(errorHandler);
|
||||
const app = express().use(bodyParser.json()).use('/items', itemsRouter).use(errorHandler);
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user