Use Express to create a skeleton for a new app

Source: Internet
Author: User

The App Builder tool express lets you quickly create an app's skeleton.

Install with the following command:

$ npm install express-generator -g

-hOption to list all available command-line options:

$ express -h


For example, the following example creates an app named MyApp under the current working directory.

$ express myapp

This is the default installation of the Jade template, if you install Ejs template, use:

$ express ejs myapp

Then install all dependent packages:

$ cd myapp $ npm install

Launch this app (MacOS or Linux platform):

$ DEBUG=myapp npm start

The Windows platform uses the following commands:

> set DEBUG=myapp & npm start

Then open the URL in the browser http://localhost:3000/ to see the app. I

Applications created with the Express app builder typically have the following directory structure:

.├── app.js├── bin│   └── www├── package.json├── public│   ├── images│   ├── javascripts│   └── stylesheets│       └── style.css├── routes│   ├── index.js│   └── users.js└── views    ├── error.jade    ├── index.jade    └── layout.jade7 directories, 9 files

Creating an app with Express app growth is just one of many approaches. You can not use it, you can also modify it to meet your needs, are open source!

 

Use Express to create a skeleton for a new app

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.