koa2-generator

1.1.7 • Public • Published

koa-generator

Koa' application generator.

NPM Version NPM Downloads Linux Build Windows Build Gratipay Greenkeeper badge

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

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.7
    1
    • latest

Version History

Package Sidebar

Install

npm i koa2-generator

Weekly Downloads

1

Version

1.1.7

License

MIT

Last publish

Collaborators

  • tomoat