Learn how to host and deploy applications on Firebase
Table of content
- Introduction
- Description and steps
- 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.
- 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
Step 2
Start the project inside Google Firebase.
-
Create a project in firebase console
-
Add google analytics to your project
- Create a google analytics account
- Create a firebase project
- After creating project continue to firebase console
Step 3
Upload the application on google firebase
-
Get started with hosting part
-
Install Firebase CLI
npm install -g firebase-tools
Setup firebase hosting
Initialize your project
-
Sign in to google
Use this command to login into firebase
firebase login
- 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
-
Choose this option for hosting
Hosting: Configure and deploy Firebase Hosting sites
- 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-demoConfigure as a single-page app (rewrite all urls to /index.html) ? : nFile angular-pwa-demo/index.html already exists. Overwrite? : n
-
Deploy to firebase hosting
Go to your project directory then deploy your project to firebase hosting
firebase deploy
Step 4
Check the status of your deployed application on Firebase
- Open firebase console
- Go to hosting option
- There are auto-generated links for your deployed application
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.