User REST API to perform CRUD operations.
This api uses GO as programming language e Docker as container.
The database for this api is MongoDB.
All settings are done through Environment Variables.
Environment variables :
Variable | Description | Default Value |
---|---|---|
PORT | Server port | 3000 |
MONGODB_URI | Mongo DB Uri connection | |
MONGODB_DATABASE | Mongo database name | |
RATE_LIMIT | Rate limit value | 1 |
RATE_LIMIT_TOKENS | Rate limit tokens value | 5 |
API_USER | Api Basic auth user | apiuser |
API_PASS | Api Basic auth password | apipass |
This API Documentation is generate using swagger.
Execute the command below :
$ make swag
Run api envorinment locally with docker-compose
Execute the command below :
$ make envup
Finish api envorinment locally with docker-compose
Execute the command below :
$ make envdown
Access the URL below :
http://localhost:3000/doc/index.html
Execute the command below :
$ make test
- Implement logs structure
- Improve API Auth
- Configure CORS to api
- Implement Code Coverage