- Firebase Tutorial
- Firebase - Home
- Firebase - Overview
- Firebase - Environment Setup
- Firebase - Data
- Firebase - Arrays
- Firebase - Write Data
- Firebase - Write List Data
- Firebase - Write Transactional Data
- Firebase - Read Data
- Firebase - Event Types
- Firebase - Detaching Callbacks
- Firebase - Queries
- Firebase - Filtering Data
- Firebase - Best Practices
- Firebase - Email Authentication
- Firebase - Google Authentication
- Firebase - Facebook Authentication
- Firebase - Twitter Authentication
- Firebase - Github Authentication
- Anonymous Authentication
- Firebase - Offline Capabilities
- Firebase - Security
- Firebase - Deploying
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 - Initialize the Firebase App
First we need to login to Firebase in the command prompt.
Open the root folder of your app in the command prompt and run the following command.
This command will initialize your app.
NOTE − If you have used a default configuration, the public 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 public 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.
After this step, the console will log your apps Firebase URL. In our case, it is called https://tutorialsfirebase.firebaseapp.com. We can run this link in the browser to see our app.