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
{
"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
Download from the command line
curl -L -o firebase.json https://files.samplefiles.com/config/firebase-json/firebase.jsonwget https://files.samplefiles.com/config/firebase-json/firebase.jsonhttps://files.samplefiles.com/config/firebase-json/firebase.jsonprintf '%s %s\n' accf0d8b34dbef97f6c7ad8a2b964cac4cb1b0fe40009afa888562cfd7b0dc9b firebase.json | shasum -a 256 -cOr check the download in your browser with the checksum calculator.