我的代码很直接 我只是测试实时Firebase数据库操作
const functions = require("firebase-functions");
const admin = require('firebase-admin');
admin.initializeApp();
const firestore = admin.firestore();
export const helloWorld = functions.https.onRequest((request, response) => {
response.send("Hello from rocon!");
});
export const create = functions.https.onRequest((request, response)=>{
return functions.database().ref('/accounts').push({name : "alex 2", email : 'rocon@gmail.com', msisdn : '01715998800'}).then((snapshot) => {
// Redirect with 303 SEE OTHER to the URL of the pushed object in the Firebase console.
return response.send(snapshot.ref.toString());
});
});
我没有找到计费帐户配置的理由。
请帮助。