I am trying to call function that use firebase services after sails server start I have tried these ways in bootstrap.js file but it didn't work ,I think config folder run before sails server start
I have search on it document but didn't found much help
The function I am trying to call have a cron jobs and this function exists on services folder
sails.after("lift", function () {
cronJob()
});
sails.on("lifted", function () {
cronJob()
});
I have put on my app.js
require('firebase-admin').initializeApp()
but every time I try to run another function using firebase services too it show me that error and when I comment cronJob() function error gone
{
"code": "app/no-app",
"message": "The default Firebase app does not exist. Make sure you call initializeApp() before using any of the Firebase services."
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…