App
Appolo app contains all the application context.
it can be injected to any class and exists on every request
The app can be injected to any class.
or accessed from req controller or middleware
Usage#
options#
app.options:IOptions#
getter returns the launch options.
set#
app.set(name: keyof IOptions, value: any)#
set any app option. app.set("port",8080) // 8080
env#
app.env: IEnv#
getter return the current env
tree#
app.tree#
return methods to traverse app child modules.
module#
app.module#
return methods to handle loading of modules.
discovery#
app.discovery#
return methods to handles exported modules files and custom decorators.
dispatcher#
app.Dispatcher#
return global event dispatcher.
injector#
app.injector :Injector#
return app injector instance
launch#
app.launch():Promise<App>#
launch the app and return the app instance when finished
reset#
app.reset():Promise<void>#
reset the app clean all assets and closes the server
server#
server(): http.Server | https.Server#
return the http server instance