First step: Download the installation file
: Official website http://www.nodejs.org/download/
Step Two: Install Nodejs
After the download is complete, double-click Node-v0.8.16-x86.msi to start installing Nodejs, which is installed by default under C:\Program Files\nodejs
Step three: Install the relevant environment
Open the C:\Program Files\nodejs directory you'll find it comes with NPM, which is installed directly with NPM
Entering the node. js Command Prompt Commands window
Enter the Nodejs installation directory C:\Program Files\nodejs
Type the command: CD C:\Program Files\nodejs can be
Start installing the relevant environment now
Install Express
NPM install-g [email protected]
Because you do not know the version of Express, execute the command NPM install express-g to reinstall the latest version
View the commands for the current Express version express-v
Installing the Express tool
NPM install-g Express-generator
Install Jade
NPM Jade
Install MySQL
NPM MySQL
........ What components to install, depending on the environment to build the requirements
By default, the above components are installed under the C:\Program Files\nodejs\node_modules folder, which is also the auto-find path for NODEJS related components
Fourth step to create the project
Go to the directory you want, execute express XXX and create a project in the current directory
Project directory Structure
bin--Store the command-line program.
node_modules--stores all of the project-dependent libraries.
public--store static files, including CSS, JS, IMG and so on.
routes--Store the routing file.
views--Store the paging file (ejs template).
app.js--program startup file.
The package.json--project relies on configuration and developer information.
node. JS Environment Build Record