Created
March 22, 2019 03:17
-
-
Save jthegedus/16d0f0dbbd0cb7db62e6fd490580d59e to your computer and use it in GitHub Desktop.
firebase microservices function example from https://medium.com/@jthegedus/scaling-firebase-973f71074f72
This file contains hidden or 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 { onNewUser } from "./onNewUser/function"; | |
// functions in this object will be prefixed with "users" | |
// Eg: auth-onNewUser | |
const auth = { onNewUser }; | |
export { auth }; |
This file contains hidden or 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 functions from "firebase-functions"; | |
import * as admin from "firebase-admin"; | |
const addNewUser = functions.auth.user().onCreate(user => { | |
// … | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment