Base template API to quick start api projects
- Basic users module with email activation, avatar, jwt authorization middleware;
- Persistence with PostgreSQL;
- Storage provider;
- Typeorm 0.3 compatible;
- Mail provider;
- Logger;
- Graceful shutdown;
- Connections rate limiter middleware for DDoS protection;
- Dynamic role-permissions system;
- Decent unit tests coverage;
You need Git, Node.js, Yarn, Docker and Docker Compose in order to run the project.
First of all, clone the repository:
git clone https://github.com/kortkamp/template-node-api.gitThen enter the folder and install dependencies
cd template-node-api
yarn installCreate your .env file and put there your configs
cp .env.example .envPull and build the docker images
docker-compose upThe API provides Swagger docs at http://localhost:3003/api-docs/#/ in case you already have the project running in your computer. In case you do not want to run the project, just got to docs.
Do not edit swagger.json file directly, instead edit the files inside ./src/docs to update you project documentations, then if you need a unique file for static serving purposes generate a new one by running the command below.
yarn docs:buildThis project is covered by tests. If you make any changes to the code, run the command below to ensure your change didn't break anything:
yarn testMade with love by Kortkamp