Created
April 4, 2020 07:27
-
-
Save sgr-ksmt/993719e251dcc559177f649656fbed6c to your computer and use it in GitHub Desktop.
Wrap firebase-functions with specified region.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as f from 'firebase-functions' | |
const functions = (runtimeOptions: f.RuntimeOptions = {}) => | |
f.runWith(runtimeOptions).region('asia-northeast1') | |
export default functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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