Skip to content

javascriptDev/generator-koa-serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 &

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
β”‚
β”œβ”€β”€ 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

About

a node js server

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors