Skip to content

Commit

Permalink
fix(server): replace body-parser by express built-in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentinTh committed Apr 25, 2021
1 parent bab3fb8 commit 75774ae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import https from 'https';
import express from 'express';
import morgan from 'morgan';
import winston from './utils/logger';
import bodyParser from 'body-parser';
import cookieParser from 'cookie-parser';
import compression from 'compression';
import cors from 'cors';
Expand Down Expand Up @@ -52,8 +51,8 @@ const appServer = https.createServer(options, app);

isDev ? app.use(morgan('dev')) : app.use(morgan('combined'), { stream: winston.stream });

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cookieParser());
app.use(compression());
app.use(helmet());
Expand Down

0 comments on commit 75774ae

Please sign in to comment.