Skip to content
Branch: master
Go to file
Code

README.md

Weather application

Weather app made with ReactJS. Automatically recognizes user's location, based on browser's settings or IP. Weather can be searched both by location on the map or entering city in the search bar.

Made using React hooks (useState, useEffect, useContext) and React context (absolutely unnecessary for a small application like this, but it was fun to learn).

Version

  • 2.1.1

Demo

Usage:

$ git clone git@github.com:ArunasNorvaisa/react-weather-app.git
$ cd react-weather-app
$ npm i -d (OR $ yarn)
$ touch .env
$ touch ./proxy/env.json
  • Get the API keys from Google and Dark Sky.
  • Update .env file in the project root (that was created at the previous step) directory with the following content:

REACT_APP_API_KEY_GL = INSERT_YOUR_GOOGLE_API_KEY
REACT_APP_API_KEY_DS = INSERT_YOUR_DARKSKY_API_KEY

  • Update ./proxy/env.json file with the following content:
{
  "DARKSKY_API_KEY": "INSERT_YOUR_DARKSKY_API_KEY"
}
  • Update ./proxy/.htaccess file to reflect your referring domain
$ npm build
  • Open /build/index.html in your browser and, if everything works as intended,
  • Upload contents of BUILD folder to your hosting provider.
  • If you have CORS/proxy related problems, read comments in /components/Weather.jsx to either enable or disable proxy.

Support:

Disclaimer

Information displayed in this web application cannot be used for commercial purposes. Weather info is powered by Dark Sky.

About

An attempt to make an ultimate weather app. In ReactJS, with React hooks and context.

Topics

Resources

You can’t perform that action at this time.