-
Notifications
You must be signed in to change notification settings - Fork 28
Classic API: App
Hayun Lee edited this page Dec 21, 2020
·
3 revisions
Parent Document: ANT APIs
App API is the set of APIs for managing application's life-cycle states.
You need to load app API module before you use its API as following.
var appApi = require(process.env.ANT_BIN_DIR + 'ant').app();
void onTermination(Function onTerminationCallback())
onTermination()
registers given onTerminationCallback
, which will be called when application termination event comes.
onTerminationCallback
contains jobs that should be done before the application is terminated.
var appApi = require('app-api');
appApi.onTermination(function () {
console.log("This function is called before this app is terminated.");
});
- Home
- About
- Getting Started
-
ANT APIs
- ANT Classic API
- ANT Lite API
- Getting Involved