Nodejs Study Note One: Install the Express framework and build the project catalog

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.