@@ -1,14 +1,11 @@
|
||||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import cors from 'cors';
|
||||
import expressLoader from "./express";
|
||||
import routeLoader from "./routes";
|
||||
import databaseLoader from "./database";
|
||||
import {Application} from "express";
|
||||
|
||||
export default async (app) => {
|
||||
app.get('/status', (req, res) => res.status(200).end());
|
||||
app.enable('trust proxy');
|
||||
|
||||
app.use(cors());
|
||||
// app.use(bodyParser.urlencoded({ extended: false }));
|
||||
|
||||
// more middlewares
|
||||
return app;
|
||||
export default async (app: Application) => {
|
||||
await expressLoader(app);
|
||||
await routeLoader(app);
|
||||
databaseLoader();
|
||||
return app;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user