To install a NodeJS application follow our general instructions for adding applications and select "NodeJS" as the application type in step 5.
When the installation is complete, the following files and directories will be present in the application directory:
stopscripts to control the operation of your application.
tmp: a directory containing temporary files used by your application
app.js: a basic Node.js "Hello World" web application
README: basic info regarding the new application.
Complete the setup by adding the application to a site.
Installing Node packages with npm¶
Switch to your application directory and install the package by running the commands in the example below, replacing
myappwith the name of your Node.js application and
packagenamewith the name of the package that you want to install:
cd ~/apps/myapp npm install packagename