This is a simple Weather Web Application based on OpenWeatherMap API.
It is developed with React.Js (using create-react-app)
- REACT_APP_API_ENDPOINT: Which is the URL of a weather web service (check .env.example for the sample endpoint)
- REACT_APP_API_KEY: Which is the app id of OpenWeatherMap service
(check the OpenWeatherMap dashboard for you private app id or simply use the one provided in .env.example which is the sample app id provided by OpenWeatherMap)
Please create a .env
file in the root of the project and add two environment variables mentioned above with their values
Make sure you added the .env
file with proper key values.
After that with node
and npm
installed, run below commands in the following order:
- Installing Dependencies:
npm install
- Run the app:
npm start
- You can now view weather.webapp in the browser:
http://localhost:3000
To Build the app, run:
npm run build
The app uses react-testing-library and jest packages to run tests.
You can run the following command to run the tests with a coverage table:
npm run test