Deploy Your React App to Firebase

Carly Ann Pecora
Oct 14, 2019 · 2 min read

Firebase is a great hosting service for a React app, and deploying is surprisingly simple!

To begin, install the firebase tools:

npm install -g firebase-tools

And be sure to install the command line tools:

yarn global add firebase-tools

Run this command to login to your firebase:

firebase login

Answer the following question with your preference:

You will be directed to google’s sign in page. Choose/login to your google account:

Click Allow:

After logging in, return to your command line!

In the root directory of your app, run:

yarn build

and

firebase init

At the above prompt, choose “Hosting: Configure and deploy Firebase Hosting sites”

In this next project setup prompt, choose “Create a new project”

At the above prompts, add a project id of your choice, and decide on what you’d like to call your project (I used the default).

Woo! Next step:

Answer the above prompts accordingly.

You’re ready to go! Run:

firebase deploy

Congrats! You’ve got a deployed project!

More From Medium

More from Carly Ann Pecora

More from Carly Ann Pecora

Routing Your React App

Also tagged Firebase

Also tagged Firebase

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade