see below my code is very simple....it listens to a change on a database field in realtime-database.
const functions = require("firebase-functions");
var admin = require("firebase-admin");
exports.onActiveUpdate = functions.database
.ref("/profiles/users/{userId}/active")
.onUpdate((change, context) => {
//code here
return true;
});
I've tried to debug code locally with the following commands
firebase serve --only functions
firebase serve
firebase emulators:start
I always get the same message...
+ functions: Emulator started at http://localhost:5001
i functions: Watching "C:\code\rn\xs\fb_functions\functions" for Cloud Functions...
i functions[onActiveUpdate]: function ignored because the database emulator does not exist or is not running.
+ All emulators started, it is now safe to connect.
But then when I go to localhost:5001....all I see is a blank page with with {"status":"alive"}
at the top.
Is this correct behavior? Thanks