firebase-app-hosting-basics

作者: firebase

使用 Firebase App Hosting 部署和管理 Web 应用。在部署带有后端的 Next.js/Angular 应用时使用此技能。

npx skills add https://github.com/firebase/skills --skill firebase-app-hosting-basics

App Hosting Basics

Description

This skill enables the agent to deploy and manage modern, full-stack web applications (Next.js, Angular, etc.) using Firebase App Hosting.

Important: In order to use App Hosting, your Firebase project must be on the Blaze pricing plan. Direct the user to https://console.firebase.google.com/project/_/overview?purchaseBillingPlan=metered to upgrade their plan.

Hosting vs App Hosting

Choose Firebase Hosting if:

  • You are deploying a static site (HTML/CSS/JS).
  • You are deploying a simple SPA (React, Vue, etc. without SSR).
  • You want full control over the build and deploy process via CLI.

Choose Firebase App Hosting if:

  • You are using a supported full-stack framework like Next.js or Angular.
  • You need Server-Side Rendering (SSR) or ISR.
  • You want an automated "git push to deploy" workflow with zero configuration.

Deploying to App Hosting

Deploy from Source

This is the recommended flow for most users.

  1. Configure firebase.json with an apphosting block.
    {
      "apphosting": {
        "backendId": "my-app-id",
        "rootDir": "/",
        "ignore": [
          "node_modules",
          ".git",
          "firebase-debug.log",
          "firebase-debug.*.log",
          "functions"
        ]
      }
    }
    
  2. Create or edit apphosting.yaml- see Configuration for more information on how to do so.
  3. If the app needs safe access to sensitive keys, use npx -y firebase-tools@latest apphosting:secrets commands to set and grant access to secrets.
  4. Run npx -y firebase-tools@latest deploy when you are ready to deploy.

Automated deployment via GitHub (CI/CD)

Alternatively, set up a backend connected to a GitHub repository for automated deployments "git push" deployments. This is only recommended for more advanced users, and is not required to use App Hosting. See CLI Commands for more information on how to set this up using CLI commands.

Emulation

See Emulation for more information on how to test your app locally using the Firebase Local Emulator Suite.

来自 firebase 的更多技能

firebase-remote-config-basics
firebase
Firebase Remote Config 的全面指南,涵盖模板管理和 SDK 使用。当用户需要帮助设置 Remote Config、管理功能标志或动态更新应用行为时,使用此技能。
officialdevelopmentapi
developing-genkit-dart
firebase
面向 Dart 的统一 AI SDK,支持代码生成、结构化输出、工具、流程和智能体。提供核心 API,涵盖生成、工具定义、流程编排、嵌入和流式处理,采用统一接口。包含 8 个以上插件,支持 LLM 提供商(Google Gemini、Anthropic Claude、OpenAI GPT)、Firebase AI、模型上下文协议、Chrome 浏览器集成,以及通过 Shelf 托管 HTTP 服务器。内置 CLI 和本地开发 UI,用于流程执行、追踪、模型实验等。
official
developing-genkit-go
firebase
使用 Go 语言中的 Genkit 开发 AI 驱动的应用程序。当用户要求使用 Genkit 在 Go 中构建 AI 功能、代理、流程或工具时使用,或在处理…
official
developing-genkit-js
firebase
使用Genkit流程、工具和多模型支持,构建AI驱动的Node.js/TypeScript应用程序。Genkit与提供商无关;通过插件支持Google AI、OpenAI、Anthropic、Ollama及其他LLM提供商。使用Zod定义类型安全的模式流程,执行生成请求,并在TypeScript中组合多步骤AI工作流。需要Genkit CLI v1.29.0及以上版本;近期主要API变更意味着您必须查阅genkit文档:read和common-errors.md以获取当前模式,而非依赖先前知识...
official
developing-genkit-python
firebase
使用 Python 中的 Genkit 开发 AI 驱动的应用程序。当用户询问关于 Genkit、AI 代理、流程或 Python 中的工具,或遇到 Genkit 相关问题时使用。
official
firebase-ai-logic
firebase
客户端Gemini集成,适用于网页应用,支持多模态推理、流式传输及设备端混合执行。支持纯文本和多模态输入(图像、音频、视频、PDF);超过20MB的文件通过Cloud Storage路由。包含自动历史记录的聊天会话、用于实时显示的流式响应,以及结构化JSON输出强制。通过Chrome中的Gemini Nano提供混合设备端推理,并自动回退到云端执行。生产环境需启用App Check...
official
firebase-ai-logic-basics
firebase
用于将Firebase AI Logic(Gemini API)集成到Web应用程序中的官方技能。涵盖设置、多模态推理、结构化输出和安全性。
official
firebase-app-hosting-basics
firebase
使用Firebase App Hosting部署和管理基于Next.js、Angular及其他支持框架的全栈Web应用。需使用Blaze定价计划的Firebase项目;支持服务端渲染(SSR)和增量静态再生(ISR)工作流。通过firebase.json配置部署,可选apphosting.yaml进行后端设置,或通过GitHub集成启用自动化"git push部署"。包含通过CLI命令进行密钥管理,以安全访问敏感密钥...
official