awsnodejs

Get started with Node.js

To get started, we suggest the following steps:

Step 1. Create a new Express project.

Install Express by executing the commands below:

$ sudo npm -g install express
$ sudo npm -g install express-generator

Then, create a skeleton project and install dependencies:

$ mkdir -p projects
$ cd projects
$ express sample-application

For more information, refer to these instructions.

Step 2. Deploy your Node.js application with Express.

To start your application server, you just have to execute the following commands, inside your application directory:

$ npm install
$ npm start

If you are using a recent Express version (greater than 4.0), you should use the following command instead:

$ ./bin/www

For more information, refer to these instructions.

Step 3. Install modules with npm.

To install modules locally, you just have to execute this command:

$ npm install PACKAGE

To install modules globally, use:

$ npm -g install PACKAGE

We recommend installing packages in both local and global modes, so that you can share installed commands and still protect the dependencies of your project.

For more information, refer to these instructions.