Nodejs Scaffolding builds express-based applications

Source: Internet
Author: User

Original link: https://www.cnblogs.com/FE-yanyi1993/p/6413042.html

This writing is very detailed and is only recorded here.

1. Install the generator

$ NPM Install Express-generator-g

2. Create an app with the name app:

$ Express App

3. Installing dependent Packages

$ CD app into the app directory

$ npm Run Install dependency package

Generate Package.json file

4. Start the application

$ NPM Start

5. Use localhost:3000 access in the browser

The default port is 3000

To change the port:

Path: app/bin/www

var port = normalizeport (Process.env.PORT | | ' 3000 ');

Nodejs Scaffolding builds express-based applications

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.