express-generator
Version:
Express' application generator
66 lines (47 loc) • 2.14 kB
Markdown
[](http://expressjs.com/)
[](https://www.npmjs.com/package/express) application generator.
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![Windows Build][appveyor-image]][appveyor-url]
```sh
$ npm install -g express-generator
```
The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:
Create the app:
```bash
$ express --view=hbs /tmp/foo && cd /tmp/foo
```
Install dependencies:
```bash
$ npm install
```
Start your Express.js app at `http://localhost:3000/`:
```bash
$ npm start
```
This generator can also be further configured with the following command line flags.
--version output the version number
-e, --ejs add ejs engine support
--pug add pug engine support
--hbs add handlebars engine support
-H, --hogan add hogan.js engine support
-v, --view <engine> add view <engine> support (dust|ejs|hbs|hjs|jade|pug|twig|vash) (defaults to jade)
--no-view use static html instead of view engine
-c, --css <engine> add stylesheet <engine> support (less|stylus|compass|sass) (defaults to plain css)
--git add .gitignore
-f, --force force on non-empty directory
-h, --help output usage information
[](LICENSE)
[]: https://img.shields.io/npm/v/express-generator.svg
[]: https://npmjs.org/package/express-generator
[]: https://img.shields.io/travis/expressjs/generator/master.svg?label=linux
[]: https://travis-ci.org/expressjs/generator
[]: https://img.shields.io/appveyor/ci/dougwilson/generator/master.svg?label=windows
[]: https://ci.appveyor.com/project/dougwilson/generator
[]: https://img.shields.io/npm/dm/express-generator.svg
[]: https://npmjs.org/package/express-generator