An app can define callbacks that are called at specific points during its lifecycle:
||Called when the application is started.|
||Called when the application is stopped.|
onStart() callback is called after the application’s REST routes have been constructed and right before they are opened to serve requests. It is a good place to acquire resources before the application starts processing requests.
onStop() callback is called after the application’s REST routes have been closed. Resources acquired during
onStart() should be released here.