Table of content 

  1. Introduction
  2. Description and steps
    1. How to register on Google Firebase.
    2. How to start the project inside Google Firebase.
    3. How to publish the application on Google Firebase.
    4. How to test and check the status of your deployed application on Firebase.
  3. Conclusion

 

Introduction-

Let's discuss hosting services in firebase and what are the simple steps to publish an application to firebase hosting really quick. But before this let's understand what and how of the firebase. As we all know this platform was developed by Firebase Inc in 2011, and later acquired by Google in the year 2014.  

Description -

Things to cover in the process of deploying on firebase 

  • How to register on Google Firebase.
  • How to start the project inside Google Firebase.
  • How to publish the application on Google Firebase.
  • How to test and check the status of your deployed application on Firebase.

By following the below steps you can cover all the questions mentioned above and can reach the final session of deploying on firebase.

 

Step 1

Register with google firebase

Let's visit Google Firebase first. If you don’t have google firebase account please register with google firebase.

Below given URL is for registration

https://console.firebase.google.com

 

Create firebase project

 

Step 2

Start the project inside Google Firebase.

  1.  Create a project in firebase console

Create a project in firebase console

 

  1.  Add google analytics to your project

Add google analytics to your project

 

  1. Create a google analytics account 

Create a google analytics account 

 

  1. Create a firebase project

Create a firebase project

 

  1. After creating project continue to firebase console

Creating project continue to firebase console

 

Step 3

Upload the application on google firebase

  1. Get started with hosting part

Get started with hosting part

 

  1. Install Firebase CLI

npm install -g firebase-tools

 

Setup firebase hosting

 

Setup firebase hosting

 

Initialize your project

  1. Sign in to google

Use this command to login into firebase 

firebase login
  1. Initialize your project 

Go to your project directory then initialize firebase in your project with firebase init command

cd dist/angular-pwa-demo/

firebase init
  1. Choose this option for hosting

Hosting: Configure and deploy Firebase Hosting sites
  1. Put your directory name for a project

You will get a message from the command line

What do you want to use as your public directory? : angular-pwa-demo

Configure as a single-page app (rewrite all urls to /index.html) ? : n

File angular-pwa-demo/index.html already exists. Overwrite? : n

 

Set up Firebase Hosting

 

  1. Deploy to firebase hosting

Go to your project directory then deploy your project to firebase hosting

firebase deploy

 

Firebase Deploy

 

Step 4

Check the status of your deployed application on Firebase

  1. Open firebase console
  2. Go to hosting option
  3. There are auto-generated links for your deployed application

 

Hosted application list

 

Reference link

https://angular-pwa-demo-23e6c.firebaseapp.com/

 

Conclusion-

Above shown steps help you in an easy hosting application on firebase. Further, this will help you in getting free hosting with limited use. From registering to status checking and deployment step by step procedure will guide you in hosting. In case if you are stuck or have any queries feel free to contact me and you can leave your valuable comments in the comment section below.