import * as morgan from 'morgan' ; import { appEvent } from '../../application/event/AppEvent' ; import { crossOrigin } from './middlewares/CrossOrigin' ; import { bootstrap } from './plugins/Bootstrap' ; import * as express from './plugins/Express' ; import { routers } from './routers/Routers' ; bootstrap ( ) ; appEvent . emitOnServerStarting ( ) ; const a = express ( ) ; a . use ( morgan ( 'dev' ) ) ; a . use ( express . json ( ) ) ; a . use ( crossOrigin ) ; routers . forEach ( router => a . use ( router ) ) ; export const server = a ;