Setting up Firebase with React

Stela Capsa
3 min readJul 6, 2021

Let’s get started! Will create a new app with React framework and our DB will be hosted by Firebase. Firebase is platform created by Google and and is Google-backend application development software.

  1. Im going to connect a project twitter-clone with Google-Firebase and React framework.

Follow the steps to create a new Firebase project

2. In the terminal create the new app in react

$ npx create-react-app twitter-clone

3. To set up the Firebase account in the terminal follow next steps, choose your operating systems.

$ curl -sL https://firebase.tools | bash
$ firebase login

You’ll be asked to enter your email. When installation is over, you should see ..

$ firebase projects:list

This command is testing if CLI is properly installed, it should list all your projects.

4. Add Firebase to your web app

In front of npm install -g add sudo, sudo gives admin so it will ask for your computer password.

$ cd twitter-clone

5. Now is time to deploy Firebase

If run firebase login earlier you can just run firebase init

$ firebase init

After following the steps run next command

npm run build

This command is building the build folder, by dropping in it the heavy files.

6. When your project is ready, is build and good to be deployed run

$ firebase deploy

Copy the given link and you can look at your project in a http format, share it with your friends and family.

Happy coding !

--

--