Giter Site home page Giter Site logo

web-stats's Introduction

README

Dependencies

  1. Ruby, developed with 2.4.1
  2. Postgres, ideally installed and launched via homebrew (if not you may need to edit database.yml)

Setup

  1. Clone the project from github and cd into it
  2. bundle install
  3. rails db:create
  4. rails db:migrate
  5. rails db:seed if you wish to load one million randomly generated records

Running the Project

  1. You can start just the rails portion via bundle exec rails s or bundle exec rails c
  2. To start Rails and the React components run foreman start -f Procfile.dev

API Routes

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

  1. /api/v1/sites/top_urls.json will return Report 1
  2. /api/v1/sites/top_referrers.json will return Report 2

React Routes

The requested reports in a more human readable form are at:

  1. /top_urls for Report 1
  2. /top_referrers for Report 2

Testing

  1. Create the test database via rails db:test:prepare
  2. Run the tests via bundle exec rspec

web-stats's People

Contributors

carrickr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.