Skip to content

Instantly share code, notes, and snippets.

@evdama
Created July 1, 2019 14:18
Show Gist options
  • Save evdama/7ac67723196710bc0735d3a4e08610df to your computer and use it in GitHub Desktop.
Save evdama/7ac67723196710bc0735d3a4e08610df to your computer and use it in GitHub Desktop.
SSR entrypoint on firebase for Sapper
import * as functions from 'firebase-functions';
//const express = require('express');
// Start writing Firebase Functions
// https://firebase.google.com/docs/functions/typescript
// We have to import the built version of the server middleware.
const { server } = require('../__sapper__/build/server/server');
exports.ssr = functions
.region('us-central1')
.https.onRequest(server);
//export const ssr = functions.https.onRequest((_req, res) => res.send('hello from the SSR function'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment