firebase-on-cloudflare
Is a Cloudflare Worker that reimplements Firebase's hosting logic.
Installation
$ yarn add firebase-on-cloudflare
Usage
import firecloud from 'firebase-on-cloudflare';
import { hosting as hostingConfig } from './firebase.json';
const fcloud = new firecloud('gitbook-staging', hostingConfig);
addEventListener("fetch", (event) => fcloud.serve(event));
Why ?
We (GitBook) built firebase-on-cloudflare
to fix connection issues we had between Cloudflare
and Fastly/Firebase Hosting
.
Ideas
- Allow routing to cloud-functions closest to users (rather than everything going to
us-central1
)