Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wrap firebase-functions with specified region.
import * as f from 'firebase-functions'
const functions = (runtimeOptions: f.RuntimeOptions = {}) =>
f.runWith(runtimeOptions).region('asia-northeast1')
export default functions
import functions from '../util/baseFunctions'
export const onCreate = functions({ memory: '512MB' })
.firestore.document('/users/{userID}')
.onCreate(async (snapshot, context) => {
//...
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment