The main goal is to create Ruby On Rails API to create addresses on database when request an address by cep to the API.
- Endpoint to generate token by email and password
- Endpoint to search address by cep and save this address with the user that made that request
- Cacheable endpoint
- Implement many-to-many relationship
- RestAPI external request
- Rails MVC concepts
- Token Authentication process
- Address endpoint performance
To run this code you should first install all dependencies
bundle install
After this execute the seeds
rails db:seed
With these configured, just start the application
rails server -b 0.0.0.0 -p 3000 -e development
To run the tests
rspec
I create a file named generated-requests with sample requests in the main endpoints that was created in this API. To make easier to test the application use this request.
Obs: This file is based on IDEA IntelliJ request generator, if you use IntelliJ you will can reproduce this requests directly by your IDE, if not, you still can use to copy the request to an other API request like Postman.