json middleware is part of Express v4.16.0
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ async function initializeExpressSync() {
|
||||
|
||||
const REQUEST_TIMEOUT = 60000; // timeout for all requests (see also setTimeout on the httpServer)
|
||||
|
||||
const json = middleware.json({ strict: true, limit: QUERY_LIMIT }), // application/json
|
||||
const json = express.json({ strict: true, limit: QUERY_LIMIT }), // application/json
|
||||
urlencoded = middleware.urlencoded({ extended: false, limit: QUERY_LIMIT }); // application/x-www-form-urlencoded
|
||||
|
||||
app.set('json spaces', 2); // pretty json
|
||||
|
||||
Reference in New Issue
Block a user