2: installing express for nodejs

<!--[if !supportLists]-->Previous we have installed the nodejs, u can entry “node -v” in the command prompt,and list infos like below ps 



 

Then u can next step, entry “npm install express”

But sometimes when u done previous step,u would know u cann’t create “hello” project. Don’t worry , u can execute the “npm install -g express-generator” command to fix it.i don’t know why,just following.

Next step is creating “hello”project in nodejs,the command is “express hello”



 

And below two step is important,u must watch it carefully

The installing command “cd hello && npm install”and the starting server command “set debug=hello:* & npm start” had listed by abrove step in the end of the print info,just copy and execute them.



 

and entering url “http://localhost:3000/ “ at the browser.when u see like



 

Congraturation,u had successfully installing the “express” for nodejs

猜你喜欢

转载自243046368.iteye.com/blog/2223644