firebase-on-cloudflare
Is a Cloudflare Worker that reimplements Firebase's hosting logic.
Installation
$ yarn add firebase-on-cloudflare
Usage
;; // Init once (globally) for better perfsconst fcloud = 'gitbook-staging' hostingConfig; // Proxy (and cache) requests to Google Cloud Functions & Firebase Hosting;
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
)