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#
optionsapp.options:IOptions
#
getter returns the launch options.
#
setapp.set(name: keyof IOptions, value: any)
#
set any app option. app.set("port",8080) // 8080
#
envapp.env: IEnv
#
getter return the current env
#
treeapp.tree
#
return methods to traverse app child modules.
#
moduleapp.module
#
return methods to handle loading of modules.
#
discoveryapp.discovery
#
return methods to handles exported modules files and custom decorators.
#
dispatcherapp.Dispatcher
#
return global event dispatcher.
#
injectorapp.injector :Injector
#
return app injector instance
#
launchapp.launch():Promise<App>
#
launch the app and return the app instance when finished
#
resetapp.reset():Promise<void>
#
reset the app clean all assets and closes the server
#
serverserver(): http.Server | https.Server
#
return the http server instance