Header Ads

How to upload a website online for free on Internet using Firebase hosting

Now days Website play a vital role for showcasing anything in this digital era. There are different kinds of websites that can be created depend on the requirements. But if we talk about of basic usage, generally static websites are created which are sufficient for showcasing your business idea or giving an overview of your organisation. As of now startup culture is in boom, where people have ideas and for showcasing them needs a minimum basic website. Creation of a website can be very easy done by spending very less amount bucks or if person itself having basic understanding of HTML, CSS and JavaScript can create a website for almost free. Once a website is created one the cramp breaking task is to host it online where we need a hosting, a domain name and a SSL certificate for website security.
If you are a new user, you can buy the custom domain for approx $1.32 (99 inr) for one year as a new joiner offer, but if we talk about buy a Hosting and SSL certificate it really cost much approx $100 for one year subscription, for testing purposes it's not feasible to spend this much amount. 

For resolving this stated issue, here we are having one of the reliable frees hosting i.e. firebase hosting which provides a hosted domain name, free web hosting with SSL secure connection.Not only this if later in future you want to make your site dynamic by adding a database or any storage, Firebase includes these feature also. According to my experience firebase is one of the reliable as it's a Google product.
So, now let's see a step by step guide to host a simple static website template to firebase hosting. As these steps are quite easy, it'll hardly take 5-8 minutes to complete them.

Code/Steps below follows the video for help:




Transcript/Cheat sheet:

Install Node.js & Npm :


For Windows:

Download Latest Nodejs Version and install it. This will install both Nodejs and Npm 

For Linux/Mac Users:

$ sudo apt-get install nodejs

Once, your are done with installing Node.js and Npm please open your command prompt or command line interface and type below commands for verifying your installation by getting similar output as given below:
$ node -v
v10.9.0   //OUTPUT
$ npm -v
6.2.0   //OUTPUT

Now, it's time to install firebase tools package on command line type:
npm install firebase-tools

Now create a project on Firebase console by login with your Google account and once done on command line type:
firebase login
This will open popup for login with your Google account so, type credentials of account which you used for creating firebase project in previous steps.

So, we have almost won the war of these shitty configurations just need to host our flag so let's do it 😜

Now we have to initialize firebase project, so on command line type:
firebase init 
This will prompt to select the project, select it by pressing Space bar key .

In feature select Firebase Hosting

Once done a Project will created in command line interface in current directory, navigate to project directory, here check for public folder and copy all your website files to this public folder.

Now all things are done at, last we just to deploy this project to firebase hosting.
firebase deploy

So, that's it now we are done with deploying our static website to firebase hosting.

Are you looking for Hosting any Django Project ?



No comments:

Powered by Blogger.