Firebase Hosting gives you a fast, secure, and reliable way to host your
serve dynamic content and host microservices. Our
production-grade hosting is backed by a global content delivery network (CDN).
Hosting serves your content over SSL, by default, and can be used with your
own custom domain or on a subdomain of
Install the Firebase CLI
Once you have Node.js and npm installed, you can install the Firebase CLI via npm:
npm install -g firebase-tools
This installs the globally available
firebase command. To update to the latest version, simply re-run the same command.
Access your Firebase projects
To connect your local machine to your Firebase account and obtain access to your Firebase projects, run the following command:
Initialize your site
From the root of your project directory, run the following command:
firebase init command creates a
firebase.json configuration file
in the root of your project directory. You can learn more about this file in the
configure hosting behavior section of this guide.
Select a public root directory
When you initialize your site, you are prompted for a directory to use as the
public root (default is "public"). If you don't already have a valid
index.html file in your public root directory, one is created for you.
Deploy your site
To deploy your site, run the following command from your project's root directory:
Your content will be deployed to your Firebase project's default Hosting
Now your site is ready to share with the world! You can also learn how to:
Also, take a look at the full documentation for the Firebase CLI.