Skip to content

Instantly share code, notes, and snippets.

@georgesboris
Created June 14, 2017 19:35
Show Gist options
  • Save georgesboris/f0aafdd9aa02360a3fe8a739df29a4dd to your computer and use it in GitHub Desktop.
Save georgesboris/f0aafdd9aa02360a3fe8a739df29a4dd to your computer and use it in GitHub Desktop.
blank firebase functions
const { firebase, functions } = require('./lib/firebase');
const times = require('lodash/times');
const myFunctions = times(33).map((i) => ({
key: `fnName_${i}`,
watcher: functions.database.ref('my-db').onWrite(() => {})
}));
myFunctions.forEach((fn) => {
exports[fn.key] = fn.watcher;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment