I am pretty new to developing and I am working on an app with node and express. I am having an issue where I get a:
"Access to XMLHttpRequest at 'https://api.darksky.net/forecast/[API_KEY]/38.7907,121.2358' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I do actually have the API key in the code within the project and I have been able to just copy/paste directly into Chrome and I get the data returned.
I'm just lost as to why it works from chrome, but not from my project. Isn't chrome also my local machine? I think I may be able to use JSONP but I'm wondering if there is a better approach?
This is a link to the project on github: https://github.com/ryanmdoyle/BrainBreak