import { createApp } from './app' ; import { port } from '../config' ; async function main ( ) { const app = await createApp ( ) ; app . listen ( port ) ; if ( process . env . NODE_ENV !== 'production' ) { console . log ( `Server ready at: http://localhost:${ port }` ) ; } } main ( ) . catch ( err => { console . error ( err ) ; process . exit ( 1 ) ; } ) ;