This repository is my personal template for building API with Koa. You can use it for your own project if it suits your needs.
Don't hesitate to let me know if you appreciate it and to share it around you.
This template has the following features :
- Testing workflow with code coverage by using
mocha
andnyc
- Docker configuration for running tests with live reload on code changes
- Dependencies injections for easy unit and integrations tests.
- Payload validation by using
koa-validator-ajv
- Logging using
winston
- API documentation using
apidoc
I use postgresSQL for the database but you can easily remove/replace postgres by what you want.
To see how i use this template you can look some codes sample from the repository : koa-template-samples.
Clone this project and inside the repository run the install.sh
script like this :
./install.sh your-project-name
This will create a new folder your-project-name
If you are on windows i dont think that the install script will work. So you can just download the repo as a .zip from github and use search and replace for koa-template
and replace by your project name.
If you want to learn how to use this template like i like to use it. You can look a this repository : koa-template-samples. You can find code recipes for some common use cases during API development.
- If you find a bug or have ideas to improve this template you can create an issue or a PR.
- If you have some ideas of code samples you can make a PR on koa-template-samples.