weather-react | robust weather application to provide | REST library
kandi X-RAY | weather-react Summary
kandi X-RAY | weather-react Summary
A robust weather application to provide current and 24 hour 7-day weather forecast for any city in the world built with ️ using React. Weather forecast data is powered by Dark Sky and city search data is powered by Algolia Places.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of weather-react
weather-react Key Features
weather-react Examples and Code Snippets
Community Discussions
Trending Discussions on weather-react
QUESTION
I've made a weather app that makes an API call to freegeoip to locate your current location's coordinates, and then using those coordinates to connect to openweathermap API to fetch your current location's weather.
In development the app worked perfectly fine. But after deploying to Heroku, I seem to get what looks like a CORS error?
Console logs:
...ANSWER
Answered 2017-Apr-29 at 20:39Just change API endpoint to use https
instead of http
.
https://freegeoip.net/json/
works well ;)
Update
Your updated question contains one more request. Unfortunately, api.openweathermap.org
is not available over HTTPS. Thus, you need to reach it thru proxy under your control and forward response to your client. For more info, see this answer
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install weather-react
These instructions are very important to avoid the Blank Page issue when running the application on http://localhost:3000.
Clone the local-setup branch in the repository
Install the packages using the command npm install
Create a .env file in the root directory of the project. Add the following properties in it: REACT_APP_DARKSKY_API_KEY=<your Dark Sky API Key> REACT_APP_ALGOLIA_PLACES_APP_ID=<your Algolia Places APP ID> (Optional) REACT_APP_ALGOLIA_PLACES_API_KEY=<your Algolia Places Search-Only API Key> (Optional) You can obtain your Algolia Places API key here. You will get higher rate limits if you sign up and provide an api key OR it's just limited to 1000 requests/day! Moreover, code logic handles the scenario where no Algolia App ID & API key are provided since these are optional.*
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page