koa2-generator
v1.1.7
Published
Koa2' application generator
Downloads
27
Maintainers
Readme
koa-generator
Koa' application generator.
Installation
$ npm install -g koa2-generator
Quick Start
The quickest way to get started with koa2 is to utilize the executable koa2(1)
to generate an application as shown below:
Create the app:
if you use hogan template engine
$ koa2 --view hogan ./app && cd ./app
if you want use yarn manage your application modules
$ npm i -g yarn
Install dependencies:
$ npm install
or
$ yarn install
Start your Koa app at http://localhost:3000/
:
$ npm start
or
$ yarn start
Command Line Options
This generator can also be further configured with the following command line flags.
Usage: koa2 [options] [dir]
options:
-h, --help output usage information
-v, --version output the version number
-e, --ejs add ejs engine support
--hbs add handlebars engine support
--pug add pug engine support
--hjs add hogan.js engine support
--njk add nunjucks engine support
--view <engine> add view <engine> support (ejs|hbs|hogan|jade|pug|twig|vash) (defaults to jade)
-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