- Firebase - Deploying
- Firebase - Security
- Firebase - Offline Capabilities
- Anonymous Authentication
- Firebase - Github Authentication
- Firebase - Twitter Authentication
- Firebase - Facebook Authentication
- Firebase - Google Authentication
- Firebase - Email Authentication
- Firebase - Best Practices
- Firebase - Filtering Data
- Firebase - Queries
- Firebase - Detaching Callbacks
- Firebase - Event Types
- Firebase - Read Data
- Firebase - Write Transactional Data
- Firebase - Write List Data
- Firebase - Write Data
- Firebase - Arrays
- Firebase - Data
- Firebase - Environment Setup
- Firebase - Overview
- Firebase - Home
Firebase Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Firebase - Deploying
In this chapter, we will show you how to host your app on the Firebase server.
Before we begin, let us just add some text to index.html body tag. In this example, we will add the following text.
<h1>WELCOME TO FIREBASE TUTORIALS APP</h1>
Step 1 - Install Firebase Tools
We need to install firebase tools globally in the command prompt window.
npm install -g firebase-tools
Step 2 - Initiapze the Firebase App
First we need to login to Firebase in the command prompt.
firebase login
Open the root folder of your app in the command prompt and run the following command.
firebase init
This command will initiapze your app.
NOTE − If you have used a default configuration, the pubpc folder will be created and the index.html inside this folder will be the starting point of your app. You can copy your app file inside the pubpc folder as a workaround.
Step 3 - Deploy Firebase App
This is the last step in this chapter. Run the following command from the command prompt to deploy your app.
firebase deploy
After this step, the console will log your apps Firebase URL. In our case, it is called
. We can run this pnk in the browser to see our app.![Firebase Deploying](/firebase/images/firebase_deploying.jpg)