Installation of Node express4.x

Source: Internet
Author: User

4.x it's not an express anymore, it's all done, and you need to install another deployment plugin

Specific:

Follow the Nodejs development guide and Knock npm install -g express ,

installed, the reason for the above is to hit the Linux command line express --help .

Workaround: Install a packagenpm install -g express-generator

Cause: express3+ has separated the functionality of creating an app for Express-generator,

You can't create an application without it.

Express-t Ejs microblog created not the Ejs template engine but the Jade template engine

Initial action: Follow the Nodejs Development Guide in command-line knocking express -t ejs microblog is used to create the application, the name of the application is microblog, the template engine is Ejs occurrence:

But by looking at the Package.json in the microblog folder, it's not the Ejs template that's created, but the Jade template engine.

Workaround: The version is different, with the wrong command, it should be express -e microblog (-E is Ejs template)

Node App.js does not work initially: follow the Nodejs development Guide and Knock node app.js at the command line,

And then just use the browser to access the listening Port 3000: access to the page

Workaround: The version is different, with the wrong command, should benpm start

Installation of Node express4.x

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.