Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...
    Documentation
    GitHub

    Integrate

    Google Cloud Functions

    The Functions Framework gives an HTTP function Express-style req and res, so the Node listener fits as it is.

    import { http } from '@google-cloud/functions-framework';
    import { toNodeListener } from '@drupflare/spool/node';
    import { page } from './routes';
    import { spool } from './spool';

    http(
    'spool',
    toNodeListener((request) => spool.handle(request, page))
    );

    examples/courses/google-cloud-functions/ runs this shape. Run npx functions-framework --target=spool in that folder.