How to deploy a web app to Firebase

justinnn07

Justin Varghese

Posted on December 27, 2020

How to deploy a web app to Firebase

Firebase is a tool powered by Google for developing mobile and web applications, It offers free hosting, NoSQL databases and many more services and makes our life pretty easier as compared to other backends like node.js etc. All you need is a Gmail account..

Setup

  1. Firstly, create a project on Firebase

  2. Make sure you have Nodejs installed in your system

  3. Open up the terminal and install the firebase-cli by npm i -g firebase-tools
    PS: On Linux or Mac type sudo npm i -g firebase-tools - this
    will give admin privileges and avoid errors

Deploying our web app to firebase

  1. Firstly open up the terminal cd into the right directory and login into your firebase account by firebase login

  2. Type firebase init in the terminal of the same directory

  3. Select Hosting from the drop-down

  4. It will ask for the root folder where your files to be deployed is contained public - will be the default folder
    PS: In case OF React JS or angular JS type in npm run build and configure your root folder as build

  5. The next few options you may either hit enter or follow it accordingly

  6. Lastly, Type firebase deploy in the terminal, Your app will be deployed with the url based on the project configured

That's it for today!

Hope you liked the post, if you’ve got any questions your can Mail us mail@stephinreji.me or join our Discord-server

Thanks

💖 💪 🙅 🚩
justinnn07
Justin Varghese

Posted on December 27, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

How to deploy a web app to Firebase
deployment How to deploy a web app to Firebase

December 27, 2020