Simple boilerplate for Koa v2 app.
git clone [email protected]:aeldar/koa-boilerplate.git
npm install
To run app in dev mode no need to build it. Just skip to run section.
Building will place the app into dist directory.
npm run build
In development mode with auto refresh:
npm start
In production mode (build and run)
npm run serve
Testing will start the app and test it.
npm test
To debug in dev mode:
npm run start:debug
To debug built version:
npm run serve:debug
npm run lint
It runs with --fix option (trying to fix what it can).
npm run flow
Koa 2 is incompatible with old Koa 1. To the moment of writing this docs the latest Koa is v1. So to install Koa v2 it should be specified like this:
npm install --save koa@2
All middleware provided by 3d parties also should be Koa2 compatible. Most of them could be installed with tag "@next". Like this:
npm i -S koa-router@next
babel-preset-latest-minimal determines what plugins are needed via feature detection. (That only makes sense for Node.js, but not for browsers.)
- Fix port for testing.
- Add chai, sinon. Add eslint support for them.