0.3.5 • Published 8 years ago

generator-koa-serve v0.3.5

Weekly downloads
5
License
-
Repository
github
Last release
8 years ago

A custom Koa generator for Yeoman.

Install

Install with npm.

$ npm install -g yo
$ npm install -g generator-koa-serve

Make a new directory and cd into it:

$ mkdir new-project && cd $_

Finally, initiate the generator:

$ yo koa-serve

Start

Requires NodeJS >= v4.2.4

$ sh begin.sh dev (开发环境)
$ sh begin.sh dist(生产环境)

browse

http://localhost:3001

Test

$ npm test

add ad view

$ yo koa-serve:view

#file structure

├── bin
│   └── www.js      enter point
│   └── config.js   config
│   └── router.js   user custom router
│
├── sys             framework scripts
│   └── app.js      
│   └── log         project log
│   └── middelware  framework needed mw
│   └── gulp-plugin
│
│
├── controllers
│   └── index.js    controller
│
├── resource
│   ├── js
│   │   │── page
│   │   │── cmp
│   │   │── tools
│   │   └── lib
│   └── css
│   │    └── index.css
│   └── less    
│   └── es6         es2015 code 
│   └── es5         compiled code
│
├── service         data mock
│   └── com.a.b 
│
├── test
│   └── routeSpec.js
│
├── views
│   ├── public
│   │       │──head.html
│   │
│   ├── template.html
│   └── index.html
│
├── begin.sh        start project
├── Dockerfile      docker config file
├── gulpfile.js
├── build.js        build es5 js (compress & concat)
└── package.json

See Koa Examples

License

MIT License @ addison

0.3.5

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.1

8 years ago

0.0.2

8 years ago