Weather API app works when I run it on a live server through my local machine but not when I deploy it through github page

Here is a link to my weather api app:https://caaartis.github.io/weather-search-api-app/

And a link to all of the source code.:https://github.com/caaartis/weather-search-api-app

What is supposed to be displayed when I look for a city on the search bar of my app:

This is a good chance to learn how to use the dev console. In most browsers, it’s something like ctrl-shift-i or ctrl-shift-j. There is a huuuuuuuge wealth of tools for the developer. Seriously, google it, look for videos, learn it.

In the console, I see this error:

app.js:14 Mixed Content: The page at ‘https://caaartis.github.io/weather-search-api-app/’ was loaded over HTTPS, but requested an insecure resource ‘http://api.openweathermap.org/data/2.5/weather?q=Tokyo&APPID=800937523595e1ccfc18152e8a5aca3b&units=metric’. This request has been blocked; the content must be served over HTTPS.

The network information is basically the same.

I’m guessing in your code, you are using “http://api.openw…”. Try https. If that doesn’t work (if the web site isn’t set up for that) then it might take some more research.

How do you make changes to your code that you uploaded on github

Thanks, that worked seemed to work

1 Like