when i try to deployee function it gives some issues. below is my code
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.addNewMessage = functions.https.onRequest((req, res) => {
// Grab the text parameter.
const original = req.query.text;
// Push the new message into the Realtime Database using the Firebase Admin SDK.
return admin.database().ref('/messages').push({original: original}).then((snapshot) => {
// Redirect with 303 SEE OTHER to the URL of the pushed object in the Firebase console.
return res.redirect(303, snapshot.ref.toString());
});
});
when i am trying to deploye i face issue enter link description here
i don't understand what is issue exactly . for firebase-admin module is there need to enable or set Environment Configuration ? if yes then how ? i dont find this any document i any one no please help me
