import "dotenv/config" ; import * as express from "express" ; import * as morgan from "morgan" ; import { middleware } from "./middleware" ; ( async ( ) => { try { const app = express ( ) ; app . use ( morgan ( "dev" ) ) ; app . use ( `/${ process . env . API_BASE_PATH ! }` , await middleware ( ) ) ; app . listen ( 9091 , ( ) => { console . log ( `API server listening on http://localhost:9091` ) ; } ) ; } catch ( err ) { console . log ( err ) ; } } ) ( ) ;