A small API made for a challenge
This application has two endpoints, one for receiving a DNS ip with its domains, and other to retrieve the DNS servers information based on domains.
- POST /v1/dns_servers;
- GET /v1/search
Take a look at the .env.development and .env.test file and make sure DATABASE_URL environment variable is correct for your environment (use your Postgres configuration).
Install all gems and create the development database for the first time:
$ bundle install
$ bin/rails db:setupTo run the server locally, run the command:
$ rails server
You can stop the server by pressing:
CTRL + C
Just run the command:
$ bundle exec rspec
Or just:
$ rspec
It will generate the file coverage/index.html containing the test results.
Before allowing you to commit your code, Overcommit will run hooks, such as RuboCop and TrailingWhitespace, to the check your code.
Install Overcommit hooks:
$ overcommit --sign
$ overcommit --install
Now you can commit.
This project is released under the MIT License.
Made by Emanuel Merayo Goldenberg