Giter Site home page Giter Site logo

dark-sky-proxy's Introduction

WHY?

If you going to build weather app or doing it right now hundred percent you encountered (or will do it) an issue. The issue is No 'Access-Control-Allow-Origin' header is present on the requested resource message in console when you try to fetch weather data from dark sky api. It turns out weather provider have disabled cross-origin resource sharing (CORS) on their servers. Actually you can read about it here.

Below is excerption from faq section

To prevent API key abuse, you should set up a proxy server to make calls to our API behind the scenes. Then you can provide forecasts to your clients without exposing your API key.

HOW TO USE

  1. fork it
  2. git clone to your machine
  3. yarn install
  4. register at https://darksky.net/dev/ to get you api key
  5. change .env.exampe to .env and put you api key as value to API_KEY.
  6. run it locally with yarn start before your weather app
  7. deploy your proxy-server to heroku or now when your weather app is ready for production (you need to run proxy-server live in internet in order for your weather app to work in production)

dark-sky-proxy's People

Contributors

dagman avatar devellopah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.