The weather retrieval uses Geocoder and the weather.gov API
-
Geocoder ( http://www.rubygeocoder.com/ ) is used to determine the latitude and longitude of a given city and state. Not every city is returned.
-
National Weather Service API ( https://www.weather.gov/documentation/services-web-api ) is used with the city's longitude and latitude to return the forecast.
-
Install Ruby version 3.1.2
-
Install bundler and bundle install
gem install bundler
bundle install
- Install yarn and yarn install
yarn install
- Run the tests
bundle exec rspec
yarn jest
- Enable the Rails cache in development
bundle exec rails dev:cache
- Run the Cypress specs
CYPRESS=1 bin/rails server -p 5017
yarn cypress open
- Run the webpack dev server
./bin/webpack-dev-server
- Run the rails server
bundle exec rails s
- Navigate to http://localhost:3000/ and enter your city and state for the forecast
The next step is to use a reliable API to retrieve the weather, possibly https://openweathermap.org/api