The LoopBack boot script generator adds a new boot script to a LoopBack application.
lb boot-script [options] [<name>]
With IBM API Connect v5 developer toolkit:
apic loopback:boot-script [options] [<name>]
With legacy StrongLoop tools:
slc loopback:boot-script [options] [<name>]
-h, --help--skip-cache--skip-installYou can optionally provide the name of the boot script as an argument. If you do, then the tool won’t prompt you for the name.
The tool will prompt you for:
The tool will create a JavaScript file with the specified name in the application’s server/boot directory.
The code will look like this, depending on your response to the prompt:
Asynchronous script:
module.exports = function(app, cb) {
process.nextTick(cb);
};
Synchronous script:
module.exports = function(app) {};