StrongLoop Arc and slc are no longer under active development, and will soon be deprecated. Arc's features are being included in the IBM API Connect Developer Toolkit: Please use it instead.
Skip to end of metadata
Go to start of metadata

Building applications:

  1. Install dependencies
  2. Bundle dependencies
  3. Create deploy package, either:

Building with slc

The slc build --install command automates the common work flow for building application dependencies, specifically:

  • npm install --ignore-scripts: Install Node dependencies without running scripts to build binary add-ons.  
    To run scripts, use the --scripts option.  See Building binary add-ons below for more information. 
  • npm run build: Specify custom build steps such as grunt build or bower in the package's property, since front-end code served by Node commonly requires some amount of preparation.
  • npm prune --production: Remove development-only tools (such as Bower or Grunt) that the package's build scripts may require, but that should not be deployed.

It runs compilation and install scripts on the deployment server using:

  • npm rebuild: Compile add-ons for current system.
  • npm install: Run any install scripts (not typical, but if they exist they may be required to prepare the application for running).

Building binary add-ons

If you're building an app on exactly the same system architecture as the deploy target, you can compile and package binary add-ons.  To do this, use this command to build:

Doing this avoids having to to use a compiler on the deployment system, and is recommended when possible.

Listing application dependencies

Use the slc ctl npmls command to display all of the dependencies of an application under management by Process Manager.  Since the dependency tree may be very large, provide an integer argument to limit the depth of the display to that number of levels; for example:

See slc ctl command reference for more details.

The result (for express-example-app) is:

Dependency tree for loopback-example-app  Expand source