A boilerplate for building RESTful APIs using Node.js, PostgreSQL, koa, knex, objection.
- Install Node.JS LTS version
- Install MongoDB community
- Clone this repository and enter on the respective folder
- Install dependencies running:
yarn
ornpm install
- Run tests:
yarn test
├── /src
| ├── /controllers
| ├── /helpers
| ├── /middleware
| ├── /models
| ├── /routes
| ├── /validators
├── /test
To use the nodemailer helper in a non-production environment, you need to set the variable in .env ALLOW_LIST
and assign an array with the domains allowed for sending e-mail. This domain must start with an @
, followed by a minimum of 2 characters, a .
and 2 characters in the end.
In case the informed email is not part of any informed domain, the email will not be sent.
- ALLOW_LIST=["@nave.rs"]
- EMAIL_1: gustavo@nave.rs -
ALLOWED
- EMAIL_2: gcdpinho@gmail.com -
NOT ALLOWED
The following domains: nave.rs
and@nave
are not allowed as they do not satisfy the domain description, given above.
This project uses mongoose as ORM.
- After adding a new queue, need to add in queue.js a new
adapter
- Acess UI on http://localhost:3001/v1/queues/dashboards