fix: make express parse body

This commit is contained in:
Wieland Schoebl
2020-07-17 14:20:11 +02:00
parent 9a93ea78c3
commit b3e107528b
3 changed files with 171 additions and 69 deletions

View File

@@ -15,6 +15,7 @@
import {Converter} from '@openstapps/core-tools/lib/schema';
import {Logger} from '@openstapps/logger';
import bodyParser from 'body-parser';
import express from 'express';
import * as http from 'http';
import * as http2 from 'http2';
@@ -119,6 +120,7 @@ export abstract class Plugin {
responseName: string,
version: string) {
this.app.use(bodyParser.json());
this.port = Plugin.normalizePort(
/* istanbul ignore next */
typeof process.env.PORT !== 'undefined' ? process.env.PORT : port.toString());