Node+express+ejs make a simple page start guide _node.js

Source: Internet
Author: User

1. Establish the Engineering folder My_ejs.

2. First use NPM install Express and NPM install Ejs

Download these two guys. As to whether to set a global, look habits, I habitually downloaded to the folder in this project My_ejs.

Then create the appropriate file:

Index.js:

Form.ejs:

Index.ejs

App.js:

Start Running App.js

Node App.js, and then browser-side access: localhost:1337

Click to publish an article:

Click Publish, jump to the home page.

Okay, so far, a simple "website" is out.

A heartfelt complaint: Learning Express+ejs is really too difficult, get a book on the top of the knock, how do not come to the expected effect; a long time to know, the original express+ejs has been changing, the only authority is the official website, but the official online said not much, but also in English, can not understand .

Do the small partners have a new understanding of Node+express+ejs? To tell the truth I am not too will, has been stones, this article is only to give you a reference.

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.