I’m trying to understand the nuts and bolts of this project, so right now this is just set up to test various parts of my code. I’m stuck trying to get it to print out the raw data from the open weather api. Can anyone help me understand?
Note that through the embed, none of this code works. On codepen through https, only the part that should actually display the JSON as a string is broken, the rest works
The local weather app was tricky for me because of the page connection. You can’t use geolocation methods when the page is not loaded in a secure connection (https), and you can’t use local weather api when your page is loaded in a secured connection. I ended up using ip-api to get the user’s location. Hope that helps.
Edit: Send a request to http://ip-api.com/json to get location, parse that and use that information in local weather app, then you dont have to worry about page connection.