0.0.4 • Published 5 years ago

firebase-on-cloudflare v0.0.4

Weekly downloads
12
License
-
Repository
-
Last release
5 years ago

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';

// Init once (globally) for better perfs
const fcloud = new firecloud('gitbook-staging', hostingConfig);

// Proxy (and cache) requests to Google Cloud Functions & Firebase Hosting
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)
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago