See the app deployed on Heroku (in progress...)
The Weather Comparison App lets you compare the 7-day forecast of multiple cities using the OpenWeatherMap API and OpenCageData's geocoding API. The Express backend is to allow my front end to be ignorant of the APIs being used for geocoding and weather, so I can switch them out more easily if I would like. It also keeps the API keys on the server side, and allows me to use environment variables in my Heroku deployment and keep them secret.
This is a React application, so React and node.js are required to run it. You will also need API keys for the OpenWeatherMap API and for OpenCageData's geocoding API. Once you have your API keys, add them to 'src/config/dev.js' with the following format:
// dev.js
module.exports = {
OWMAppId: <your-id-string>,
openCageApiKey: <your-id-string>
};
In the project directory, first run:
to install the necessary packages, then cd
to the client
directory and again run:
Finally, to run the app, return to the top level directory and run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.