This App provides some basic services for converting currency and showing rates. Currency rates are fetched from currencylayer API (https://currencylayer.com).
- Install [Ruby] >= 2.3.1
- Install [Rails] ~> 5.2.4
- Install [PostgreSQL]
- Install [Redis]
- Clone repo:
git clone https://github.com/ditjonberisha/currency_converter.git
- Run bundle install inside the dir
bundle install
- Copy env_sample and change values
cp .env_sample .env
- Create the database and run migration
rails db:setup rails db:migrate rails db:seed
- Run the server:
rails s
- Run sidekiq (for background jobs):
bundle exec sidekiq
- For getting rates for the first time (inside the dir)
rails c CurrencyRatesWorker.perform_async(DateTime.now)
Run rspec tests:
rspec