koa-routing-controllers
Create highly performant and well-structured class-based controllers for Koa 2 using TypeScript.
NOTE: This is a "work in progress" project and many features are currently absent. Pull requests are welcome! :)
Installation
- Install this package:
npm install koa-routing-controllers
- Install reflect-metadata package:
npm install reflect-metadata
and make sure to import it before using this package:
- Make sure you have
experimentalDecorators
andemitDecoratorMetadata
options enabled intsconfig.json
:
"emitDecoratorMetadata": true,"experimentalDecorators": true,
Usage
; ; createKoaServer.listen8080,;
Roadmap
- Add needed decorators
- Add more type coverage
- Add support for injectable parameters
- Add support for scoped middlewares
- Add support for body/query validation
- Add documentation