English 中文(简体)
Firebase - Deploying
  • 时间:2025-02-05

Firebase - Deploying


Previous Page Next Page  

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 https://tutorialsfirebase.firebaseapp.com. We can run this pnk in the browser to see our app.

Firebase Deploying Advertisements