From 027e2814a87130ca6e64331372d11c513d5c55fc Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 14 Feb 2018 15:46:42 +0100 Subject: [PATCH] refactor: use body-parser bundled with express (#304) --- lib/app.js | 3 +-- package.json | 1 - yarn.lock | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/app.js b/lib/app.js index ca819c9ed8..1c01c4ca45 100644 --- a/lib/app.js +++ b/lib/app.js @@ -2,7 +2,6 @@ const express = require('express'); const favicon = require('serve-favicon'); -const bodyParser = require('body-parser'); const cookieParser = require('cookie-parser'); const routes = require('./routes'); const path = require('path'); @@ -28,7 +27,7 @@ module.exports = function(config) { } app.use(cookieParser()); - app.use(bodyParser.json({ strict: false })); + app.use(express.json({ strict: false })); app.use(unleashSession(config)); app.use(responseTime(config)); app.use(requestLogger(config)); diff --git a/package.json b/package.json index d8013233c7..939e54a8f7 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ }, "dependencies": { "async": "^2.1.5", - "body-parser": "^1.18.2", "commander": "^2.9.0", "cookie-parser": "^1.4.3", "cookie-session": "^2.0.0-beta.3", diff --git a/yarn.lock b/yarn.lock index a6d366dc8e..77942e5538 100644 --- a/yarn.lock +++ b/yarn.lock @@ -767,7 +767,7 @@ blueimp-md5@^2.3.0: version "2.10.0" resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.10.0.tgz#02f0843921f90dca14f5b8920a38593201d6964d" -body-parser@1.18.2, body-parser@^1.18.2: +body-parser@1.18.2: version "1.18.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" dependencies: