Home Documentation Templates Examples Showcase GitHub
Theme

Platform target

Firebase Hosting

Firebase Hosting naturally consumes Nift's normal public/ directory. The target adds a minimal firebase.json that declares that deployment root.

nift init --target=firebase

What Nift creates

{
  "hosting": {
    "public": "public",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
  }
}

The public property is Firebase Hosting's required deployment-directory setting. The file is user-owned after initialization.

Routing, headers and caching

Firebase Hosting configuration can define redirects, rewrites and custom headers, including cache-control policy. A custom 404.html in the deployed directory is also supported.

Dynamic endpoints

Hosting rewrites can send matching requests to Cloud Functions or Cloud Run. That gives a Nift site dynamic endpoints without turning the whole frontend into a runtime-rendered application.

Hosting, not App Hosting.

This Nift target uses Firebase Hosting's static deployment model. Firebase App Hosting is a separate Cloud Run-oriented product with a different framework/runtime bundle.

Official references: Hosting configuration, dynamic rewrites, and cache behaviour.

Next platformRender →