- Ruby, developed with
2.4.1 - Postgres, ideally installed and launched via homebrew (if not you may need to edit
database.yml)
- Clone the project from github and
cdinto it bundle installrails db:createrails db:migraterails db:seedif you wish to load one million randomly generated records
- You can start just the rails portion via
bundle exec rails sorbundle exec rails c - To start Rails and the React components run
foreman start -f Procfile.dev
There are two routes to get the json required by the exercise. These are intended for use by any applications that might query this Rails App
/api/v1/sites/top_urls.jsonwill return Report 1/api/v1/sites/top_referrers.jsonwill return Report 2
The requested reports in a more human readable form are at:
/top_urlsfor Report 1/top_referrersfor Report 2
- Create the test database via
rails db:test:prepare - Run the tests via
bundle exec rspec