A simple app to query current weather, based on OpenWeatherMap.
- Ruby = 2.6.3
- Node >= 10.15.3
- Yarn >= 1.16.0
- PostgreSQL = 11.3
- Clone this repo.
- Create a file named as
master.key
, which should be localized into/config
folder. - Duplicate the file
database.yml.sample
, localized on folder/config
, name it asdatabase.yml
and insert your Postgres configuration. - Duplicate the file
.env.sample
, localized on root path and name it as�.env.development
, complete the parameters. - Duplicate the file
�env.js.sample
, localized on folder�/app/javascript/src/config
, name it as�env.js
and complete the parameters. - Install the dependencies following these commands:
$ bundle
$ yarn
- Create the database and tables:
$ rails db:create db:migrate
- Enable development mode cache (check the result, if it was enabled):
$ rails dev:cache
- After set up, you need to run webpack dev server (in another window):
$ ./bin/webpack-dev-server
- Then, finally, run Rails server:
$ rails s -p 3000 -b 0.0.0.0
- Set up the project. (following the instructions on the "How to set up this project" section)
- Create the test database and tables:
$ rails db:create db:migrate RAILS_ENV=test
- Run tests:
$ bundle exec rspec
- If you don't have an OpenWeatherMap
�appid
, you can create one by accessing this guide: https://openweathermap.org/guide.