我在Firebase文档中找不到解决方案.
我想在functions.https.onCall本地测试我的功能.是否可以使用shell或以某种方式将我的客户端(启用firebase SDK)连接到本地服务器?
我想避免每次只是为了测试对我的onCall功能的更改而进行部署.
功能:
exports.myFunction = functions.https.onCall((data, context) => {
// Do something
});
Run Code Online (Sandbox Code Playgroud)
客户:
const message = { message: 'Hello.' };
firebase.functions().httpsCallable('myFunction')(message)
.then(result => {
// Do something //
})
.catch(error => {
// Error handler //
});
Run Code Online (Sandbox Code Playgroud)