import { ApplicationConfig } from '@loopback/core' ; import { RestApplication , RestServer } from '@loopback/rest' ; export { ApplicationConfig } ; export class HelloWorldApplication extends RestApplication { constructor ( options = { } ) { super ( options ) ; this . handler ( ( { response } , sequence ) => { sequence . send ( response , 'Hello World!' ) ; } ) ; } async start ( ) { await super . start ( ) ; if ( ! this . options ?. disableConsoleLog ) { const rest = await this . getServer ( RestServer ) ; console . log ( `REST server running on port: ${ await rest . get ( 'rest.port' ) }` ) ; } } }