Skip to content

emerayo/dns

Repository files navigation

DNS Challenge

A small API made for a challenge

About

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

System dependencies

Development

Setup for development

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:setup

Running the server

To run the server locally, run the command:

$ rails server

You can stop the server by pressing:

CTRL + C

Running the tests

Just run the command:

$ bundle exec rspec

Or just:

$ rspec

It will generate the file coverage/index.html containing the test results.

Committing

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.

License

This project is released under the MIT License.

Credits

Made by Emanuel Merayo Goldenberg

About

Rails API for DNS servers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages