All skills
firebase avatar

/firebase-app-hosting-basics

@073edf7
by firebasefirebase/skills461 stars
102

Deploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering (SSR) using Firebase App Hosting. Use when deploying Next.js/Angular apps, configuring apphosting.yaml or firebase.json apphosting blocks, managing secrets, setting up GitHub CI/CD, or configuring Blaze billing requirements. Don't use for classic static web hosting, Auth, Firestore, Crashlytics, or Xcode.

Use this Skill: https://skilld.dev/gh/firebase/skills/firebase-app-hosting-basics

This session only. Nothing lands on disk.

referencesemulation.md

≈374 tokens on demand. Your agent reads this file only when SKILL.md points to it.

App Hosting Emulation

You can test your App Hosting setup locally using the Firebase Local Emulator Suite. This allows you to verify your app's behavior with environment variables and secrets before deploying.

Configuration: apphosting.emulator.yaml

This optional file overrides apphosting.yaml settings specifically for the local emulator. Use it to provide local secret values or override resource configs. If it contains sensitive values such as API keys, do not commit it to source control.

# apphosting.emulator.yaml (gitignored usually)
runConfig:
  cpu: 1
  memoryMiB: 512

env:
  - variable: API_KEY
    value: "local-dev-api-key" # Override secret with local value

Running the Emulator

To start the App Hosting emulator:

npx -y firebase-tools@latest emulators:start --only apphosting

Or, if you are also using other emulators (Auth, Firestore, etc.):

npx -y firebase-tools@latest emulators:start

Capabilities

  • Builds your app: Runs the build command defined in your package.json to generate the serving artifact.
  • Serves locally: Runs the app on localhost:5004 (default). Configurable by setting host and port in the emulators block of firebase.json, like so:
{
  "emulators": {
    "apphosting": {
      "host": "localhost",
      "port": 5004
    }
  }
}
  • Env Var Injection: Injects variables defined in apphosting.yaml and apphosting.emulator.yaml into the process.

Source: SKILL.md on GitHub

1 warning17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides instructions for managing Firebase App Hosting using official tools and CLI commands. It uses resources from the trusted vendor (Firebase) for deployment, secret management, and project configuration. The behaviors described are standard for the skill's stated purpose and do not represent a security risk beyond the typical surface for development tools.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    2/4 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 073edf7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 2 months ago
metadata
{
  "category": "Serverless"
}
  • Next.js
  • firebase
  • app-hosting
  • angular
  • ssr
  • deployment
  • full-stack
  • cicd

README badge

README badge for firebase/skills/firebase-app-hosting-basics

Deploys full-stack web applications like Next.js and Angular to Firebase App Hosting with server-side rendering and automated git-push-to-deploy workflows. Requires a Blaze pricing plan and handles secrets management via CLI.

Generated from the current SKILL.md.

Does my Firebase project need to be on a specific pricing plan to use App Hosting?
Yes. Your Firebase project must be on the Blaze pricing plan (pay-as-you-go). You can upgrade at https://console.firebase.google.com/project/_/overview?purchaseBillingPlan=metered.
What frameworks does App Hosting support?
App Hosting is designed for full-stack frameworks like Next.js and Angular that support Server-Side Rendering (SSR) or Incremental Static Regeneration (ISR).
Should I use App Hosting or Firebase Hosting?
Use App Hosting if you're deploying a full-stack framework like Next.js or Angular with SSR; use Firebase Hosting if you're deploying a static site or simple single-page app without server-side rendering.
Can I set up automated deployments from GitHub?
Yes, App Hosting supports automated "git push to deploy" workflows via GitHub CI/CD, though this is recommended for advanced users and not required to use App Hosting.
How do I manage sensitive keys and credentials?
Use the `npx firebase-tools@latest apphosting:secrets` commands to securely set and grant access to sensitive environment variables.

Generated from the current SKILL.md. These answers refresh after source changes.