|
|
@@ -1,4 +1,6 @@
|
|
|
const express = require('express');
|
|
|
+const bodyParser = require('body-parser');
|
|
|
+
|
|
|
const webpack = require('webpack');
|
|
|
const path = require('path');
|
|
|
|
|
|
@@ -38,6 +40,10 @@ function clientRoute(config, db, logger, app) {
|
|
|
app.use(express.static(path.resolve(__dirname, '../../static')));
|
|
|
}
|
|
|
|
|
|
+function setupMiddleware(app) {
|
|
|
+ app.use(bodyParser.json());
|
|
|
+}
|
|
|
+
|
|
|
async function run() {
|
|
|
const config = getConfig();
|
|
|
const logger = getLogger(config);
|
|
|
@@ -47,6 +53,8 @@ async function run() {
|
|
|
|
|
|
const app = express();
|
|
|
|
|
|
+ setupMiddleware(app);
|
|
|
+
|
|
|
healthEndpoint(config, db, logger, app);
|
|
|
setupDevServer(config, db, logger, app);
|
|
|
clientRoute(config, db, logger, app);
|