Create Ejs project in Nodejs Express, solve express under the default create Jade, cannot create ejs problem

Source: Internet
Author: User

Recently, looking at the node. JS Development Guide, I saw a problem with preparing to create a Ejs project when using Nodejs for Web development, and the book commands:

Express-t Ejs Microblog

Copy Code

But after execution, the Jade project is still being created. Originally, the Create Ejs command in express3.x,express4.x was updated to:

EXPRESS-E microblog//i.e. ejs,-j (i.e. jade)

Copy Code

Of course, the most straightforward, you can also modify the definition in the Package.json to implement the installation Ejs. PS: Establishing the Engineering Process 1. The Express framework must be installed: Express installation commands are also updated and need to be installed Express-generator

$ NPM INSTALL-G Express//Global installation

$ NPM install-g express-generator//This command is not forgotten, otherwise it will prompt "express command cannot find"

Copy Code

2. Establishment of website engineering structure:

Express-e Ejs Microblog

Copy Code

3. Follow the prompts to enter the folder installation

CD microblog//microblog the folder for the project you created earlier

NPM Install

Create Ejs project in Nodejs Express, solve express under the default create Jade, cannot create ejs problem

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.