I got tired of having my API Keys out in the open with the FCC projects. So, I started a side project to create a boiler plate node.js w/ express backend to store my API Keys. You can use it as you like and host it on any webhost of your choice. Let me know if you have any questions!
Whoa, I had similar thoughts just a few days ago and was going to do something similar on Glitch once I’m done with the current project.
I think it would be fantastic if you could create a boilerplate on Glitch so that it can be easily remixed. Most people who would use this are probably beginners and wouldn’t just have a Node server running somewhere, using Glitch also fits with the new curriculum, too.
For any webhost, they will require you to take additional steps, but a lot of that are covered in their documentation.
I personally pay for webhosting ($10 a month) on webfaction. For example, the require additional steps on running your node application via an SSH client. I also use the forever.js module to have my node application running 24/7 when the webfaction server resets.
A host, any host in general, are just servers. In reality, we can run servers and host our website (may it be wordpress, a simple website, etc.) with a computer. Now to have this host up 24/7, you will need that computer up and running at all times. This comes with maintenance and other important configurations we have to worry about. So we use web-hosting to cut out that management process.
In my example of WebFaction, they give us the option to install node.js in our web applications. I am unsure on how SiteGround operates, but generally you can install node on any server as long as the web host allows it.
SSH client is just an application that allows us to connect to servers securely using the secure shell protocol. More on SSH here: https://en.wikipedia.org/wiki/Secure_Shell. This will allow me to run commands/scripts on the server through a terminal and provides me with flexibility on configuring my node.js webapplication.
These are just very simple explanations and I am in no way an expert. If anyone would like to chime in and add, it would be most appreciated
Many apologies for the delayed response, @deuscode!
I remixed your Glitch boilerplate and made small adjustments with the code to work with Dark Sky’s weather API—I’m happy to report that it’s working beautifully (I tested it on CodePen as well). Would definitely recommend it to anyone wanting to hide API keys!