Skip to content

Instantly share code, notes, and snippets.

@gajjardarshithasmukhbhai
Last active November 6, 2019 12:51
Show Gist options
  • Save gajjardarshithasmukhbhai/f3bb71161a2fcee8df95012bec0d1747 to your computer and use it in GitHub Desktop.
Save gajjardarshithasmukhbhai/f3bb71161a2fcee8df95012bec0d1747 to your computer and use it in GitHub Desktop.
How to firebase is used for hosting for react App and normal web app.

How to React or Any Web app host in Firestore

step:1

Install Firebase CLI To host your site with Firebase Hosting, you need the Firebase CLI (a command line tool). Run the following npm command to install the CLI or update to the latest CLI version.

npm install -g firebase-tools

step:2

Initialise your project Open a terminal window and navigate to or create a root directory for your web app

Sign in to Firebase CLI

firebase login

Sign out to Firebase CLI

firebase logout

Initiate your project Run this command from your app's root directory:

firebase init

step:3

Deploy to Firebase Hosting When you're ready, deploy your web app Put your static files (e.g. HTML, CSS, JS) in your app’s deploy directory (the default is 'public'). Then, run this command from your app’s root directory:

firebase deploy
@gajjardarshithasmukhbhai
Copy link
Author

**NICE Gist **

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment