-t, --theme [name] switch application theme to [white|green|violet|red]. Defaults to red.
-d, --db [engine] change database to one of [mysql|postgresql|mongo|redis|memory|disk]. Defaults to disk.
-c, --css [engine] add stylesheet support [less|stylus|plain]. Defaults to plain css.
-a, --auth [type] add [type] authentication support [facebook|google|github|bitbucket|local]. Defaults to local only.
Use ":" as separator for multiples (f.x. local:facebook:google). Set to false to disable (like koa-mvc ... -a false).
-e, --template [engine] change template engine. Support [ejs] only for now. Defaults to ejs.
-i, --i18n add i18n support. Translations used by i18n-node-2 ported to koa-i18n
-S, --no-session remove session support. Session is enabled by default.
-f, --force force on non-empty directory
Example using layout green, mysql as db, facebook and google authentication:
koa-mvc ~/www/test-koa-mvc -t green --db mysql -a local:facebook:google
cd~/www/test-koa-mvc
npm install
node --harmony --harmony_proxies app
better i18n support (actually use it in the views to translate)
convert css to less (works if there is raw css but it's not ideal)
add tests
Also
Generate controller command
Generate model command
Generate CRUD command
Notes
Koa currently requires node 0.11.x for the --harmony --harmony_proxies flags which exposes generators and proxies to your script. If you're running an earlier version of node you may install n, a node version manager to quickly install 0.11.x:
请发表评论