implementation details

ref #6
This commit is contained in:
2020-11-27 21:24:55 +01:00
parent e29c0cb7a1
commit d85c126c27
2 changed files with 13 additions and 8 deletions

View File

@@ -3,11 +3,15 @@ import * as dotenvSafe from "dotenv-safe";
import { createExpressServer } from "routing-controllers";
import consola from "consola";
import loaders from "./loaders/index";
import authchecker from "./authchecker";
import { ErrorHandler } from './middlewares/ErrorHandler';
dotenvSafe.config();
const PORT = process.env.APP_PORT || 4010;
const app = createExpressServer({
authorizationChecker: authchecker,
middlewares: [ErrorHandler],
development: process.env.NODE_ENV === "production",
cors: true,
routePrefix: "/api",