Express install Guide and Use
Refer to Express Guide
Getting Started
Install express
npm install -g express
After the installation is complete you can use the npm info express version to confirm express.
Example1:
The sample was install for individual project under express
Create a project folder
$ mkdir helloworld
You will need a "package.json" file in the project folder, this file contains "project name" "description" "project version" and "project dependencies conten".
$ vim package.json
{
"name": "helloworld",
"description": "helloworld",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x"
}
}
Save package.json and starting install express from the project
$ npm install
After the installation is complete the following information will be shown
express@3.4.8 node_modules/express
├── merge-descriptors@0.0.1
├── methods@0.1.0
├── cookie-signature@1.0.1
├── range-parser@0.0.4
├── fresh@0.2.0
├── debug@0.7.4
├── buffer-crc32@0.2.1
├── cookie@0.1.0
├── mkdirp@0.3.5
├── commander@1.3.2 (keypress@0.1.0)
├── send@0.1.4 (mime@1.2.11)
└── connect@2.12.0 (uid2@0.0.3, pause@0.0.1, bytes@0.2.1, raw-body@1.1.2, qs@0.6.6, batch@0.5.0, negotiator@0.3.0, multiparty@2.2.0)
Example2:
The sample was install express on Global system
$ npm install -g express
0 意見:
張貼留言