- 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
cd
into it bundle install
rails db:create
rails db:migrate
rails db:seed
if you wish to load one million randomly generated records
- You can start just the rails portion via
bundle exec rails s
orbundle 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.json
will return Report 1/api/v1/sites/top_referrers.json
will return Report 2
The requested reports in a more human readable form are at:
/top_urls
for Report 1/top_referrers
for Report 2
- Create the test database via
rails db:test:prepare
- Run the tests via
bundle exec rspec