Table of contents
- Prerequisite
- Step 1 : Go to Firebase official website
- Step 2: Run the Command Prompt as Administrator
- Step 3: Do this command
- Step 4 : Create firebase project
- Step 5 : Go to your Angular Application using cmd
- Step 6 : firebase init
- Step 7: Add this code to your firebase.json file
- Step 8 : ng build
- Step 9 : firebase deploy
- Website Link
- This is the step by step on how i deploy my angular app to firebase
Prerequisite
Ready Angular App
Node Js
Google Account
Step 1 : Go to Firebase official website
- Do this so that you can login or sign up your acccount in firebase
Step 2: Run the Command Prompt as Administrator
- Do this so you can deploy your application
Step 3: Do this command
npm install -g firebase-tools
- This command will install all the firebase tools needed
firebase experiments:enable webframeworks
- This command will enable the webframeworks support
firebase login
- This command will login your account in firebase if this command use you will be redirected to firebase account setup and then login your account
Step 4 : Create firebase project
- Create firebase project and setup it
Step 5 : Go to your Angular Application using cmd
- use cd and dir commands
Step 6 : firebase init
- Do this command to initialize the application
Step 7: Add this code to your firebase.json file
{
"hosting": {
"source": ".",
"ignore": [
"firebase.json",
"*/.",
"*/node_modules/*"
],
"frameworksBackend": {
"region": "asia-east1"
}
}
}
- Add this code if you use VS Code so you will not get any error to your deployment
Step 8 : ng build
- Do this command to build the app
Step 9 : firebase deploy
- Do this command to deploy the app to firebase