firebase-hosting-basics

Deploy static sites and SPAs to Firebase Hosting with CLI configuration and preview channels.

2|Updated Mar 7, 2025
One-click install
npx skills add https://github.com/AbdelrhmanUZaki/KnowledgeNuggets --skill firebase-hosting-basics-abdelrhmanuzaki
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: firebase-hosting-basics
Source: https://github.com/AbdelrhmanUZaki/KnowledgeNuggets/tree/main/2-setup/shared/gemini/config/plugins/firebase/skills/firebase_hosting_basics
Command: npx skills add https://github.com/AbdelrhmanUZaki/KnowledgeNuggets --skill firebase-hosting-basics-abdelrhmanuzaki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires firebase-tools, and includes references (resource) components.

What problem does it solve? It guides developers through configuring, deploying, and testing web apps on Firebase Hosting (Classic), removing guesswork around firebase.json setup, preview channels, and local emulation. ## Core Features & Use Cases - Configuration Guidance: Explains firebase.json settings for public directories, redirects, rewrites, and headers via reference docs. - Deployment Workflows: Covers deploying to live channels, using temporary preview URLs, and managing releases. - Local Emulation: Runs the Hosting emulator locally at localhost:5000 for pre-deploy testing. - Use Case: You have a React SPA build output and want to deploy it to a global CDN with SSL, test it on a preview channel, then promote it to production. ## Quick Start Ask the assistant to help you configure firebase.json and deploy your static site to Firebase Hosting using the Firebase CLI.

Frequently Asked Questions about firebase-hosting-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a static site to Firebase Hosting?▼

Deploy a static site by configuring the public directory in firebase.json and running the Firebase CLI deploy command. You can test changes first on temporary preview channels before promoting them to the live site.

Firebase Hosting vs Firebase App Hosting: which should I use?▼

Use Firebase Hosting for static sites and simple SPAs without server-side rendering, where you control builds via CLI. Choose Firebase App Hosting for full-stack frameworks like Next.js or Angular needing SSR, ISR, or git-push-to-deploy workflows.

How do I test Firebase Hosting locally before deploying?▼

Run npx -y firebase-tools@latest emulators:start --only hosting to start the local emulator. This serves your app at http://localhost:5000 by default so you can verify behavior before deploying.

Can Firebase Hosting serve dynamic content or microservices?▼

Yes, Firebase Hosting can serve dynamic content by integrating with Cloud Functions or Cloud Run. You configure rewrites in firebase.json to route specific paths to your backend services.

Does Firebase Hosting support preview channels and GitHub integration?▼

Yes, Firebase Hosting supports temporary preview channels for testing changes before going live. It also integrates with GitHub Actions to automate preview deployments and live releases on pull requests and merges.