Config Files · 1 file

Sample firebase.json File

firebase.json configures Firebase Hosting, Functions and emulators. Our sample is realistic and valid for its tool, with fake hosts and secrets.

firebase.json · 623 B

firebase.json

A Firebase config with Hosting (rewrites to a function, cache headers), Firestore rules and emulator ports. All hosts, keys and secrets are fake.

CC0 · free for any use · Verified by an independent tool · Report a problem

firebase.json — first linesJSON
{
  "hosting": {
    "public": "dist",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      { "source": "/api/**", "function": "api" },
      { "source": "**", "destination": "/index.html" }
    ],
    "headers": [
      { "source": "**/*.@(js|css)", "headers": [{ "key": "Cache-Control", "value": "max-age=31536000" }] }
    ]
  },
  "firestore": { "rules": "firestore.rules", "indexes": "firestore.indexes.json" },
  "functions": { "source": "functions", "runtime": "nodejs22" },
  "emulators": { "auth": { "port": 9099 }, "firestore": { "port": 8080 }, "hosting": { "port": 5000 } }
}

File details

Size
623 B (623 bytes)
MIME type
application/json
SHA-256
accf0d8b34dbef97f6c7ad8a2b964cac4cb1b0fe40009afa888562cfd7b0dc9b
MD5
cb146a541382a52826aadc72f79b9fdc

Download from the command line

curl -L -o firebase.json https://files.samplefiles.com/config/firebase-json/firebase.json

Or check the download in your browser with the checksum calculator.