This is part 3 of a series detailing the steps required to obtain free hosting on a modern cloud provider.
In this part we take a look at Google Firebase. The documentation for this process is already really good, so this document will just be a summary.
Step 1 – Login or create a Google account
Step 2 – create a project
Within Firebase all related resources are contained within a project, so this must be created first.
- Enter a unique
Project name– this must be unique to your login. If the name is also unique within Firebase the
Project IDwill match the
Project name, otherwise a suffix will be automatically added.
- Check the boxes, and click
Step 3 – create a hosting resource
Within the application a hosting resource is created.
- Within the project select
This is where you need to roll your sleeves up. Your Firebase web application is mostly controlled via a Command Line Interface (CLI). You need to use NPM, which which should be automatically installed with Node.js
Open a command line (windows) or terminal window (mac) in a suitable folder and use the CLI to create your Firebase hosting resource. Copy the install command from the browser and paste it into the CLI and hit
NOTE: you will need Admin or sudo permissions to complete this.
npm install -g firebase-tools
You should now have a working demo website.
To make sure this is the correct content, you must now copy all the files and folders from your website into the
public folder and run
firebase deploy again.
IMHO Firebase has the best documentation that I’ve seen, and if you are comfortable with the CLI then it’s all pretty straight forward. However, if you are not at home in the terminal, then the CLI will be very intimidating to most non-developers.
There isn’t yet a built in story for deploying from source either, which I think is a mistake on the part of the Google team. Git is so ubiquitous now that this should be available by default. Deploying via a repository also enforces development “best-practices” such as source control and CI.
There is an excellent Firecast on how to deploy via Travis CI, but adding another dependency into the mix doesn’t sit well with me – it is adding unnecessary sprawl and complexity.