Encounter node is in a sunny morning, inadvertently open a blog to see a piece about Nodejs introduction, read through the entire, mood ups and downs, ah, so good things I actually now know, this is the most gas, so immediately began to formulate learning Nodejs plan, good, words not much to say, Start my study record.
To learn node first development environment is not very small, the following record the installation Express framework and build the first node project (skip install Nodejs environment, because already installed, nodejs.org download the corresponding installation package next fool install):
1. Install Express
Express is the most popular web development framework on Nodejs, just like the name, using it we can quickly develop a Web application, open cmd, my nodejs installed under F:\nodejs\nodejsinsall\, so the CD Big Olympics this directory, Run the command npm install-g [email protected]. This command contains the following information:-G is a globally installed command, after @ is the installed version. There are also the commands to uninstall this framework: NPM Uninstall Express. OK, can i express-v output the version number, prove the installation success, note that V must be capitalized
2. Create a new project
After the Express framework is installed, we will create a new project, CD to the specified directory execution express-e blog,blog is the project folder name can be replaced by their project name, after execution
OK, so that we can successfully create a project directory, and then we will install NPM package, CD to the blog root directory to perform NPM install
After the successful installation of NPM will add a Node_modules folder after the installation is complete, we execute the node app to view the frame bound port, which is generally listening 3000,ok, done, after the browser browse local 3000 port
Since then, we have initialized a project with the express framework, and the next one continues to learn about the internal structure of the project.
Nodejs Study Note One: Install the Express framework and build the project catalog