I've been running websites with Firebase for years. It's reassuring knowing that you don't have to worry if your site is up and running or if your server is performing well. You know that your content is being served with the reliability, performance and speed that only Google can offer.
Beyond that, they make it super simple to integrate with their products. You simply log in, run a couple commands and your site is live. In this article I'll give you an overview of how I set up my websites using Firebase.
First, Do Some Basic Research
In the first step you'll want to do a domain name search (just google that phrase if you don't know how) to see which domains are available that you like.
Once you've found a domain that you like, go to Gmail and register a new account that is <domainname>@gmail.com. If that email address isn't available, you may want to consider trying for another domain name. That is not totally necessary, however, and the domain name is generally much more important than the email address so proceed either way.
Next, Register the Domain
Once you've found a domain that you like, the next step is to register it. The registrar that I typically use is GoDaddy. Registering a new domain for a year usually costs somewhere around $30. Make sure you include privacy protection when you are checking out (this will add about $12 for each year of your term). This will keep your personal information private from the public.
You can generally find coupon codes online for a lot of the bigger registrars out there. So, for example, when I want to register a new domain name I'll just Google the phrase "GoDaddy coupon code" and will find a few coupon sites in the top results. This can be a great way to save a significant chunk of money, especially if you are registering a brand new domain.
Then, Sign Up for a Gmail Account
Next, sign up for the Gmail account that I called out earlier. This would be <yourdomain>@gmail.com. This step won't cost you anything, and this is the account that you'll use to set up Firebase, Google Analytics and potentially a few other products along the way.
It's also a good idea to keep each site that you own as isolated from everything else as possible. This frees you up for potential opportunities down the road to be able to sell your site to someone else and transfer everything cleanly and easily.
Sign Up for Firebase and Create Your Project
Next, you'll want to use the Gmail account just created to sign up for Firebase. If you're already logged in under that account then the process is simple. Once you have created your account, you'll need to create a new project.
For starters, just choose web hosting as your project type. There are storage and traffic limits on the free tier but I have found them to be extremely generous and more than enough to handle a hobby site or anything else with low traffic.
Link Your Domain to Your Project
Install Firebase CLI
You can install the Firebase CLI by using the following command. This command assumes that you already have Node installed on your machine:
npm install -g firebase-tools
The Firebase project site will give you a command to run in your project directory to initialize the project. You'll set an output directory (which is the directory to be deployed) and the rest is pretty much taken care of for you.
Deploy Your Site!
Once you've done all of that you simply run firebase deploy and the contents of your output directory will be deployed to your Firebase project. If you've set up your custom domain name already then you should be able to hit the site and see your project live!
Wrapping Up
Deploying a site to Firebase is just the first step in a long journey in owning and operating a website. You'll learn many lessons along the way, so remain patient and try not to feel overwhelmed. The main thing is to get started and try it out, and this should get you well on your way to doing that.
The icing on the cake is the fact that you get to run this on Google's infrastructure for little to no long-term cost. Aside from registering your domain name (which is technically optional), you can likely get by for a long, long time without racking up any hosting charges. Life is good!