koac
v1.0.2
Published
CLI for generating MVC Koa endpoints.
Downloads
13
Readme
Koac
CLI for generating MVC Koa endpoints.
Install
npm i -D kaoc
Usage
In your server.js
config, insert // koac
.
Routes for any generator will be added between // koac
and // /koac
.
In commands, casing is important from a convention POV but feel free to do your own thing.
Generate project boilerplate
koac -p my-truck-site
Generate resource
koac -r Truck
Generate model
koac -m Truck
Generate controller
koac -c TrucksController
Generate test boilerplate
Passing -t
with -r
, -m
, or -c
to add relevant test boilerplate inside of /tests
.
We use AVA because it's fast (async) and simple. Accepting implementation suggestions and framework-specific PRs if you prefer something else.
Wishlist
- [ ] Ability to pass Sequelize-friendly schemas.
- [ ] Generate migrations.
- [ ] Ability to generate scaffolds by passing
-s
with a template frontend. e.g.koac -s react
. But this really begins escaping the scope of this project (which is simply geared towards speeding up endpoint development).