Local Weather App Not Working in Code Pen



I am beginner and learning to code. As part of my learning I have made the Local Weather App.

It works fine on my local environment but when I am trying to set it up on Codepen the java script is not working.

Kindly help me this.

Code Pen Link:- https://codepen.io/SachinChauhan/pen/NgQyvx


Codepen page was loaded over HTTPS, but yours XMLHttpRequest use HTTP.
Use this for API: https://darksky.net/dev/docs/forecast


Hi Slobodan-mirkovic,

Thanks for your suggestion… It worked…

Instead of using the open weather api I switched to “https://fcc-weather-api.glitch.me/” and it worked…

Cheers !!