A yo generator with koa.js from sudiyi.
First, install Yeoman and generator-koa-sudiyi using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-koa-sudiyi
Then generate your new project:
yo koa-sudiyi
Scaffolds out a complete generator directory structure for you:
.
├──lib/
│ ├── controllers/
│ ├── middlewares/
│ │ └── common/
│ │ └── request_id.js
│ ├── models/
│ ├── db/
│ ├── logger/
│ ├── routes/
│ ├── utils/
│ └── index.js
│
├── public/
├── app.js
├── .gitignore
├── .jshintrc
├── package.json
└── README.md
After the installation, we could run script to start server (http://localhost:3333).
npm start
The formal version of this generator. Works properly.
Will keep eyes on module update.
Tiny modify to Sequlize version to 3.13.0 (Because 3.14.3 will cause promise warning).
Modify index.js for further mocha test(next version will add a sample).
Remove the useless modules and add co-mocha
, co-supertest
to package.json
Simplify the node modules required and add logger, routes and some common middlewares.
Sudiyi is cool to help user to collect online shopping packages.
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced. Feel free to learn more about him.
MIT © Bo Li (solee.me)