In this post, we will learn how to host a static website for absolutely free and one of the best website hosting platforms i.e. Google Firebase.
A Static website is a website that does not have any dynamic rendering and does not have service side rendering. It can still talk to APIs.
We will use Google Firebase Hosting as our hosting provider. Google Firebase provides free web hosting for 1GB of data and 10GB of data transfer limit for a month.
Let's navigate to https://firebase.google.com and log in via your Google account.
The "Spark Plan" of Google Firebase offers 1GB of website hosting and 10GB per month of data transfer and is the free plan that Google Firebase offers.
We will click on the "Start Now" button
When in console.firebase.google.com click on the "Create A Project" button
Then Click on "Create Project" to create a project on Google Firebase.
Now that Google Firebase has created us a project and we are in that project, we will start by creating an application for that project. So we will select a "Web project"
Google Firebase then asks us to Add Firebase to your web app.
Give a name to the web application you want to register with your project.
To host your website with Google Firebase Hosting, you need the Firebase CLI. Run the following npm command to install the CLI or update to the latest version of the CLI.
But before using the command, we have to make sure we have node installed in our machine.
The next step is to login to the Firebase CLI using the below command. So use the command prompt window or a terminal and paste the below in it.
It will ask you the following question: "Allow Firebase to collect CLI usage and error reporting information?" - type "Y" and press enter.
It opens a browser window and asks you to login to Google via your Google account.
After logging in, the command prompt or terminal tells you that you have successfully logged in to the account.
You must be signed in to comment.