StrongLoop Node.js API Platform
StrongLoop's Node API platform consists of:
- LoopBack, an open-source framework for Node based on Express.
- Tools for Node applications to:
- Run and debug locally.
- Profile CPU and memory consumption.
- Build and deploy for production.
- Scale to multiple processes and across multiple server hosts.
- Perform logging.
- Monitor performance metrics.
If you are developing a new Node application or API, use the LoopBack framework. It provides codeless API composition, isomorphic models, mobile and AngularJS SDKs, security, and a host of additional evolving features with a thriving community; see the LoopBackJS Google Group.
If you have an existing Node application, see Operating Node applications for more information on StrongLoop Node devops solutions.
Prerequisites
Operating systems and browsers
StrongLoop Arc and slc run on all StrongLoop supported platforms: Windows, Mac OS, and Linux.
StrongLoop Arc has been tested and verified in Chrome browsers; however, it should also run in:
- Firefox
- Safari
- Internet Explorer 10+
Additional requirements and restrictions
Certain features have additional requirements and restrictions, as noted below.
Build and deploy
To deploy an application using Git, you must have the Git source code management tool.
Configuration on Windows
By default, Git on Windows does not support paths longer than 260 characters; therefore, to avoid errors you must enable long paths with the following command:
Profiling
To use StrongLoop Profiling, you must:
- Have C++ compiler tools on the system running the application you wish to profile. See Installing compiler tools for details.
- Use Node version 0.10.x or later.
You cannot generate profiles for applications running on Windows 8 systems, due to a known issue in Node.
Metrics
To generate performance metrics, you must:
Once you have a license key, simply enter these commands:
where xxxxx is your valid license key string. This command generates a strongloop.json file for your application containing your license key. See Viewing metrics with Arc for more information.
What you're going to do
Your going to run npm install -g strongloop, which installs:
- The LoopBack framework, including loopback, loopback-datasource-juggler modules, and numerous other related StrongLoop modules, along with modules that they require.
- The StrongLoop command-line tool,
slc, for creating LoopBack applications and for running and managing Node applications. - StrongLoop Arc, the unified graphical tool suite for the API lifecycle, including tools for building, profiling and monitoring Node apps.
- LoopBack Angular command line tools (
lb-ngandlb-ng-doc). See AngularJS JavaScript SDK for details. - Various other tools, Including Yeoman, the LoopBack Yeoman generators to create and scaffold LoopBack applications, and Grunt, the JavaScript task runner.
Install on your system
Follow the instructions below for your operating system.
Windows
Install Node.js
Reinstall npm
The version of npm installed as part of the Node installation is known to have issues on Windows. To avoid these problems, reinstall npm, which actually installs npm2:
Install StrongLoop
Follow these steps:
- Open a Windows Command Prompt. NOTE: Node does not support Cygwin. You must use the Windows Command Prompt (shell).
If you run into any problems, see Installation troubleshooting.
Mac OSX
Set file and directory privileges
To install Node and StrongLoop, you need to have permission to write to the following directories:
/usr/local/bin
/usr/local/lib/node_modules
Although you can work around this by using sudo, in general, it's not a good idea. Rather, best practice is to explicitly set directory ownership and privileges explicitly as follows:
These commands make your user account the owner of the /usr/local/bin and /usr/local/lib/node_modules directories. Then you won't have to use sudo to install Node or install packages globally with npm. For more information, see How to Node.
Install Node.js
Install Node.js: Download the native installer from nodejs.org.
Install StrongLoop
Follow these steps:
- Open a Terminal window.
Enter this command:
If you run into any problems, see Installation troubleshooting.
Linux
Set file and directory privileges
To install Node and StrongLoop , you need permissions to write to directories:
/usr/local/bin/usr/local/lib/node_modules
Although you can work around this by using sudo, in general, it's not a good idea. Rather, best practice is to explicitly set directory ownership and privileges explicitly as follows:
These commands make your user account the owner of the /usr/local/bin and /usr/local/lib/node_modules directories. Then you won't have to use sudo to install Node or install packages globally with npm. For more information, see How to Node.
Install Node.js
Install Node.js: See Installing Node.js via package manager.
Install StrongLoop
Follow these steps:
Enter this command:
If you run into any problems, see Installation troubleshooting.
Confirm installation
Confirm the installation and view slc help by entering this command:
You'll see a standard "man page":
If you see this, then you're good to go!
If not, refer to Installation troubleshooting.