Node. JS Express installation and sample site setup

Source: Internet
Author: User
Tags install node

1. First of all, you must install Node. JS

Windows CMD enters the following command in Turn:

CD C:\Program files\nodejs\

NPM Install-g Express
NPM install-g Express-generator

2. Create an example Project

Windows CMD enters the following command in Turn:

CD C:\Program Files\nodejs\node_global

Express-e MICROBLOG//I.E. ejs,-j (I.E. Jade)

CD microblog

NPM Install 3. Modify the HTTP server JS file to modify the App.js file, Remove module.exports = app, Add App.listen (3000); 4 Turn on the service listener: under the cmd command, enter the following: CD C:\Program files\nodejs\node_global\microblognode app.js 5. In the browser input http://127.0.0.1:3000 The interface is displayed as Follows:

At this point a sample site was successfully built

Node. JS Express installation and sample site setup

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.