We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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.
onTermination()
onTerminationCallback
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."); });