In previous posts I have mentioned that this blog is about my journey to create a side-hustle software project brick-by-brick, and to level up my front-end skills (which are not great) I decided to build and deploy a simple front-end only web application using Vue. You can read more about the implementation details in the previous few posts.
In this post I am going to quickly cover how I deployed the site.
The loose ‘definition-of-done’ that I gave myself for the first project was ‘develop and deploy front-end only site that works, does something useful that has the potential for making some money’
The site is marginally useful - there may be someone out there who wants a no-frills meeting cost calculator, but the potential for making money is, um., not very high. I had some ideas for how to use it to generate revenue (I’ll probably cover that in a future post) but given the simplicity of the site none of them were realistically ever going to make much.
Still, I definitely wanted to deploy a working site to the internet as my ‘finish line’. There is usually a huge complexity difference between 'it works on my machine' and 'it works for everyone' and I want to make sure that I am learning web deployment and hosting techniques as part of my skill-up journey.
Since the aim of the game for my side-hustle is to make money, I also wanted the hosting costs for this low-potential site to be as cheap as possible.
I ended up choosing Cloudflare Pages as my hosting option for a number of reasons
It is a free product for low traffic web-sites
It is great fit for Javascript sites that don’t have a back-end component
It has integrated continuous deployment with GitHub
It has free SSL
I had already bought the DNS for the site from Cloudflare, so there was no issue with DNS remapping.
Did I mention that it is free?
The other options that I considered were Azure, AWS and Digital Ocean. I came up with this short list by googling ‘best low cost SAAS hosting options’ and then adding Azure to the list. I added Azure because this is the cloud provider that I am most familiar with, but a quick look at the real hosting costs quickly put me off. Both Azure and AWS might be good options for business that have actual paying clients, but they are not friendly for cheapskates or tyre-kickers.
Digital Ocean looks like a reasonable option for sites that need a self-hosted back-end, but their pricing isn’t free. I really like free. Especially for this site. The only limitation of the free plan that I can see is that it limits you to a maximum of 500 builds per month. If you are building more frequently than that then you probably way past the 'just getting started' phase and hopefully have a solid revenue stream!
Anyway, choosing Cloudflare Pages enabled me to check the ‘deployed and actual web site’ box without paying anything.
(In full disclosure, since I am paying for the DNS entry for the site I am actually losing a small amount of money on this site. Horror! My side hustle business is currently in the red! I should never have made the dog my CFO - I can tell her heart just isn’t in it... In seriousness though, I have given myself a very modest budget to get this whole thing started, I can sustain some costs but where possible I will try to avoid them! )
- Create a new Pages site and integrate is with a GitHub repository, as detailed in the documentation here:
- Create a custom domain for your site and set up a custom domain that links it to the Cloudfare DNS entry you have created, as detailed in the documentation here
- Fully test your site locally. Run a local build and resolve any errors.
- Push a git commit to the github branch you have linked to. CloudFlare pages will detect the commit, and automatically build and deploy your site.