From 8e2c1c1b286d2f1c337e19cc4a91b10df91f1d6d Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 29 Sep 2020 02:44:12 -0400 Subject: [PATCH] add body-parser middleware to server --- src/class/Server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/class/Server.ts b/src/class/Server.ts index 34519aa..7cfd4d3 100644 --- a/src/class/Server.ts +++ b/src/class/Server.ts @@ -1,6 +1,6 @@ import express from 'express'; +import bodyParser from 'body-parser'; import helmet from 'helmet'; -import { promises as fs } from 'fs'; import { Server as HTTPServer } from 'http'; import { Collection, ServerManagement, Route } from '.'; @@ -51,6 +51,7 @@ export default class Server { public init() { this.app.set('trust proxy', 'loopback'); + this.app.use(bodyParser.json()); this.app.use(helmet({ hsts: false, hidePoweredBy: false,