node. JS Express 4.x Installation Guide (Express is not a solution for internal or external commands)

Source: Internet
Author: User

Express launched a few days ago 4.0, learned that the news, I tried a bit, suddenly found that the previous documents on the operation of a variety of problems. The result is only to see the document, now in this to share the next 4.0 version of the installation.

First, if you need to use the Express 3.x version, directly using the @ character in the NMP to determine the version, the instructions are as follows:

NPM install-g [email protected]

If you need to use 4.0, here's a question to be aware of in version 4.x Express has separated the command line tool (link https://github.com/expressjs/generator)

We now have a global installation that only needs to install this command-line tool, and the instructions are as follows:

NPM install-g Express-generator

We then set out to install the Express framework, with the following instructions:

    • Express Blog && CD Blog

(blog is the folder name of the installation)

    • NPM Install

(Install Express and dependent)

    • NPM start

(It is important to note that the Express 4.x cannot start with node app.js, but instead uses the command NPM start as the boot)

Visit Http://localhost:3000/to see the familiar welcome to Express, proving that the installation was successful.

Then we can try out the new features of 4.0.

This article transferred from: http://www.cnblogs.com/moonpanda/p/3669735.html

node. JS Express 4.x Installation Guide (Express is not a solution for internal or external commands)

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.