Instantly share code, notes, and snippets.

Embed
What would you like to do?
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