Skip to content

Instantly share code, notes, and snippets.

@meDavid
Created May 3, 2017 15:01
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 meDavid/e6f32c3d2bd99d7e0e35786d213ec3ce to your computer and use it in GitHub Desktop.
Save meDavid/e6f32c3d2bd99d7e0e35786d213ec3ce to your computer and use it in GitHub Desktop.
let functions = require('firebase-functions');
functions.database.ref('/cars/{carId}').onWrite(event => console.log('db write to cars', event));
functions.analytics.event('my_event_name').onLog(event => console.log(event));
functions.auth.user().onCreate(event => console.log('create user', event));
functions.auth.user().onDelete(event => console.log('delete user', event));
functions.storage.object().onChange(event => console.log('storage change', event));
functions.pubsub.topic('my_topic').onPublish(event => console.log('message published', event));
functions.https.onRequest((request, response) => console.log('https request', request));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment