Skip to content

Weather Alert built in React, Open Weather Map & Google Map APIs.

License

Notifications You must be signed in to change notification settings

pragyav/CWeather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Alert Application

Find the current weather and 5 day forecast with an Alert of any city with this web app

cweather


Simple React web application written with jsx that returns the current weather. The app utilizes:


How to run the app locally:

  1. Run npm install to install all needed dependencies.
  2. Navigate to OpenWeatherMap's and get a free API key. Then, create a file named .env in the project root and add the following line: API_KEY=yourkeyhere. This will give you access to API_KEY as a global variable anywhere in the client. It allows you to use your API Key while keeping it secret from everyone else.
  3. Get a key to access the Google Places API.
  • Open index.html and replace this url on line 11: https://maps.googleapis.com/maps/api/js?key=AIzaSyBWcVjtZJPe-zwnKYHoSeyDd7XETs2qWxQ&libraries=places with your own version of the link. Your API key should go after the = and before the &. See below: https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places
  1. If you don't have webpack installed on your machine, run npm install webpack -g.
  2. Open up two command prompts. In one, run webpack -w. This lets webpack watch for changes to your files. After any saved changes, webpack automatically runs and updates your bundle.js file.
  3. In the other command prompt run npm start or node server.js. These commands do the same thing: Starting your server to host the web app.
  4. Navigate to localhost:3000 to see the app in action

About

Weather Alert built in React, Open Weather Map & Google Map APIs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published