Page Contents

Synopsis

The LoopBack boot script generator adds a new boot script to a LoopBack application.

lb boot-script [options] [<name>]

With IBM API Connect developer toolkit:

apic loopback:boot-script [options] [<name>]

With legacy StrongLoop tools:

slc loopback:boot-script [options] [<name>]

Options

-h, --help
ツールのオプションと使い方を表示します。
--skip-cache
質問の回答を記憶しません。既定値は false です。
--skip-install
依存関係を自動的にインストールしません。既定値は false です。

Arguments

You 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.

Interactive Prompts

The tool will prompt you for:

  • The name of the boot script, if you didn’t provide it on the command-line.
  • Whether you want to created an asynchronous or synchronous boot script.

Output

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) {};
Tags: tools