Skip to content

Instantly share code, notes, and snippets.

@jthegedus
Created March 22, 2019 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jthegedus/16d0f0dbbd0cb7db62e6fd490580d59e to your computer and use it in GitHub Desktop.
Save jthegedus/16d0f0dbbd0cb7db62e6fd490580d59e to your computer and use it in GitHub Desktop.
firebase microservices function example from https://medium.com/@jthegedus/scaling-firebase-973f71074f72
import { onNewUser } from "./onNewUser/function";
// functions in this object will be prefixed with "users"
// Eg: auth-onNewUser
const auth = { onNewUser };
export { auth };
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