DEV Community

Cover image for How to deploy a web app to Firebase
Justin Varghese for For Community

Posted on

6 1

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

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Image of DataStax

AI Agents Made Easy with Langflow

Connect models, vector stores, memory and other AI building blocks with the click of a button to build and deploy AI-powered agents.

Get started for free

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay