Thursday, 13 April 2017

Do I need to call admin.initializeApp at the top of each Firebase function module file

My Firebase functions index.js is getting to the size where I'd like to start splitting the code file off into multiple module files.

However it's unclear whether I need to call this line at the top of each module/file which will be accessing the Firebase database.

admin.initializeApp(functions.config().firebase);

Please excuse me if this is really obvious. I am not an experienced Node.js user.



via Christopher

No comments:

Post a Comment