Hosting a website in Firebase in 2 mins


We can host a website to Firebase in 2 mins

Prerequisite

Node should be installed. If node is not installed in your system you can download node from this download link




You can check whether node is installed or not by checking it’s version using the following command :

`node -v`

Once node is installed we can host a website to firebase

Step 1: Go to your firebase console and create a new project


Step 2: Once you create a new project in firebase open your terminal

Step 3: Once the terminal is opened install firebase tools in your system by the following command

npm install -g firebase-tools

Step 4: Login to your firebase account using the following command

    firebase login

Step 5: Go to your project folder which is to be hosted and open the terminal and give the following command

    firebase init

Step 6: Select hosting in the firebase option by pressing spacebar

Step 7: Enter the name of the folder which you want to be hosted in firebase

Step 8: once folder name is entered enter no for single page access and overwriting your index.html file of your website

Step 9: Once done firebase will create the following files in your project folder

  404.html
       firebase.json
       .firebaserc

Step 10: Once these files are created deploy your code to your firebase account using the following command:

      firebase deploy

Once done your project will be deployed to firebase hosting and an hosting url will be available.



Comments

Popular posts from this blog

Google play Impersonation and Intellectual Property

Creating Gauge chart in React Native

React Native Splash Screen