Node.js has been all the rage for several years now. The momentum and traction since ~2014 seems to have caught the ‘enterprise community’ off guard. Data center penetration is growing and raising alarms with Chief Information and Computer Security Officers, mostly concerned over source code pollution at GitHub and NPM. Justified or not, there is still no credible evidence based answer to this concern.
As developers continue to pile into this stack, more are asking where to host their prototype or hobby apps. Preferably free, or at least modestly priced.
I’ve been using and recommending Heroku for a few years. Not that it’s the best, cheapest or most performant but because it’s the one I’m most familiar with.
Heroku was around long before all the nodejs excitement started. Founded ~2007 I think.
As has the other critical piece of infrastructure – free MongoDB hosting at mLab.
mLabs is closely integrated into Heroku as an ‘add-on’ so separate registration is not required.
Heroku dashboard serves as the portal to manage your nodejs instance or Dyno as Heroku calls it (not to be confused with a Slug, but I am) and your mongodb collections.
Heroku and mLabs are now wholly owned subsidiaries of Salesforce.com and both host their offerings on Amazon AWS S3.
A third piece of crucial free infrastructure is DNS hosting, robust Content Delivery Networking and SSL encryption.
This too can be had for free by hobbyists and developers via Cloudflare.
It’s been a well kept secret for a long time now.
So what we have is,
Free Nodejs & MongoDB Hosting = Heroku + mLabs + Cloudflare
All you need to get these three pieces up and running is an email address and about a half hour (probably more if you need DNS to propagate).
In the next post we’ll see how to get a simple app running that allows users to upload an image file and store it in mongodb.
The running example is here.