loading...
Cover image for How to deploy/Host React project on firebase

How to deploy/Host React project on firebase

abodmicheal profile image Abod Micheal ・1 min read
$ npm install -g firebase-tools

$ firebase login

$ firebase init

◯ Database: Deploy Firebase Realtime Database Rules

◯ Firestore: Deploy rules and create indexes for Firestore

◯ Functions: Configure and deploy Cloud Functions

❯◯ Hosting: Configure and deploy Firebase Hosting sites
(use space to select)
◯ Storage: Deploy Cloud Storage security rules

? Select a default Firebase project for this directory:

-> react-project-abod (react-project)

i Using project react-project (react-project)

? What do you want to use as your public directory? build

? Configure as a single-page app (rewrite all urls to /index.html)? Yes

? File public/index.html already exists. Overwrite? No

$ npm run build

$ firebase deploy

Discussion

markdown guide
 

Could you use the markdown code block fencing? It makes it easier to read and it colors syntax

$ npm install -g firebase-tools
$ firebase login
$ firebase init