Skip to content

noahaklem/weather-watcher-backend

Repository files navigation

Weather Watcher

An API Rails App Project

Backend Development

Noah Klem - 2022

Contact Information

         

Weather Watch is a backend RESTful api that make calls to two external apis. The api responds to the following endpoints:

  • get api/v1/forecasts
  • post api/v1/forecasts
  • get api/v1/users
  • post api/v1/users
  • post '/login'
  • post '/signup'

A Note on External API Keys and .env File

The external api's called are :

  • OpenWeather:

    This api retrieves weather information any location across the globe. Most api's are paid on requests.

  • MapQuestApi:

    This is a geocoding api for any location across the globe. Most api's are paid on requests.

** These apis require keys to work. This project makes use of, and walks through, a .env file that stores these keys but is not included in your download. You will need to sign up and retrieve api keys in order for this application to work. How you choose to plug these api keys into your fetch calls, is up to you.

Installation

In the command line run the following:

  1. $ bundle install
  2. $ rails db:migrate

Setup API Keys

  1. Create a .env in the root folder of the project
  2. Navigate to the folder
  3. Add your api keys with the following format: 'COORD_API_KEY'='your api key here' 'WEATHER_API_KEY'='your api key here'
  4. Add your .env file to your gitignore
  5. You can now access your keys anywhere in your code with ENV['NAME_OF_KEY']

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published