unoduetre / juice

Juice test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Juice Technical Test

Setup

Clone the repository

$ git clone 'https://github.com/unoduetre/juice.git'
$ cd juice

Retrieve Alpha Vantage API key

  1. Click here and generate the API key.
  2. Copy the .env.example file.
$ cp .env.example .env
  1. Edit the .env file and follow the comments there.

Install ruby and node

I assumed you use rbenv and nodenv for (respectively) ruby and node version management. If you use other tools, change the following lines accordingly.

Do:

$ rbenv install
$ nodenv install

Install packages

Do:

$ bundle
$ yarn

Initialize the database

Do:

$ ./bin/rails db:setup
$ ./bin/rails db:migrate
$ RAILS_ENV=test ./bin/rails db:migrate

Run tests

Run the tests to check, if you have set up the application correctly.

To run server-side tests, do:

$ ./bin/rspec

To run client-side tests, do:

$ yarn test

If all tests pass, the application has been set up succesfully.

Start the application

Do:

$ ./bin/dev

Separately start sidekiq:

$ ./bin/sidekiq

How to use

External API calls are made every 5 minutes.

After entering the stock symbol, e.g. "IBM" or "CAN", you should wait 5 min. until the data is populated from the API.

Internal API calls are made every 3 seconds.

The last column is the volume.

About

Juice test

License:MIT License


Languages

Language:Ruby 84.0%Language:HTML 8.6%Language:JavaScript 7.1%Language:Shell 0.3%Language:SCSS 0.1%