Reputation: 1359
How I can deploy an angular application on Firebase cloud for free using CLI
. I just started practicing of angular 9 and Firebase cloud server to explore my self, and want to check how easy to deploy an app on Firebase.
Upvotes: 0
Views: 270
Reputation: 71901
The package @angular/fire
has a built-in deploy functionality. You can read the documentation here.
Basically what you have to do to get your angular application running in firebase:
// this will guide you through the authentication system, and make the necessary changes
ng add @angular/fire
// now you can deploy your app
ng deploy
And you are done :)
If you want support for multiple projects you can re-run the previous commands, but then you include a --project
parameter:
ng add @angular/fire --project=[PROJECT_NAME]
ng deploy --project=[PROJECT_NAME]
Upvotes: 1
Reputation: 1359
Deploy angular/any site on Firebase absolutely free using below steps:
Prerequisite: Sign in into Firebase console using google account and then create project for angular app.
Add Firebase package in angular app
CLI: >ng add @angular/fire
Install Firebase tools on your system
CLI: >npm install -g firebase-tools
Make sure Firebase tools has been installed properly
CLI: >firebase --version
Login into Firebase account
CLI: >firebase login
Setup Firebase... You will be asked some options to set here
CLI: >firebase init
Finally deploy the angular app on Firebase cloud
CLI: >firebase deploy
Now we can see angular app running on Firebase server: https://[firebase-project].web.app/
.
Upvotes: 0