node. JS Learning Notes under Windows (6)---install Express

Source: Internet
Author: User

What is Express?

Express.js is an MVC development framework for NODEJS and supports a variety of templates such as Jade. For Web applications, there are many common patterns such as templates and routing, although you can also write code to solve these problems, but many developers will choose such as express framework to avoid such work, and contribute to it

1. Install Express, the command is: NPM Install-g Express, here-G means that express will be installed globally and can be used anywhere in the system with its commands

2. Install the Express command tool, the command is: NPM install-g express-generator ( If you do not do this, you will be reported that Express is not an internal or external command error )

3. Check if Express is installed successfully, command: EXPRESS-V (V must be capitalized)

4. Create a project using Express

Then express reminds us to install the dependent modules needed to run the Express

5. Run, note that the command is NPM start

6. Enter in the browser: http://127.0.0.1:3000, ah, finally succeeded, so we created a project called Express_example.

7. Analysis, the entire Express_example project directory is as follows

node. JS Learning Notes under Windows (6)---install Express

Related Article

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.