Node + express + ejs simple page Getting Started Guide, ejs Getting Started Guide

Source: Internet
Author: User

Node + express + ejs simple page Getting Started Guide, ejs Getting Started Guide

1. Create the project folder my_ejs.

2. Use npm install express and npm install ejs

Download these two guys. As for whether or not to set them to global, I am used to downloading them to the folder my_ejs in this project.

Then create the corresponding file:

Index. js:

Form. ejs:

Index. ejs

App. js:

Start running app. js

Node app. js, and then access: localhost: 1337 on the browser side

Click post:

Click "Post" to go to the homepage.

So far, a simple "website" is ready.

I sincerely complained that it was too difficult to learn express + ejs. When I got a book and tried to get the expected results, I learned that express + ejs has been changing for a long time, the only authority is the official website, but there are not many official websites mentioned above, and they are all in English and cannot be understood at all.

Are you new to node + express + ejs. To tell the truth, I am not a good expert. I have been crossing the river by feeling the stones. This article is just for your reference.

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.