export * from './application' ; import { GreetingApplication } from './application' ; export async function main ( ) { const config = { rest : { port : + ( process . env . PORT ?? 3000 ) , host : process . env . HOST ?? '127.0.0.1' , openApiSpec : { setServersFromRequest : true , } , } , } ; const app = new GreetingApplication ( config ) ; await app . main ( ) ; const url = app . restServer . url ; console . log ( `Greeting service is running at ${ url }/greet/world?count=5.` ) ; console . log ( `Metrics is running at ${ url }/metrics` ) ; } if ( require . main === module ) { main ( ) . catch ( err => { console . error ( 'Cannot start the application.' , err ) ; process . exit ( 1 ) ; } ) ; }