Weather Project and API key


I noticed that Student solutions for this project have their Open Weather Map API keys public. I initially did this but deleted my first key and generated a second and used this page to hide my key. Of course I can’t publish a ‘View in browser’. Is there a solution that would allow secret keys to be hidden but gh-pages to work?


For a free limited API key, I don’t see this being a large problem, but you do bring up a good point about mentioning security of API keys and the like.

I do not believe it’s possible to keep an API key secret with GitHub pages without some sort of back end. By the nature of this project, the API key is used with front-end JavaScript which gets sent to the client. Without having some sort of backend, the API key has to be send to allow the web page to access the API. There isn’t a good solution to this at this point in the course.