是否可以通过单击HTML中的按钮来运行firebase云函数?
html
<html>
<head>
<title>My Title</title>
</head>
<body>
This is some content
<button onclick="exports.testName('testTxt')">click test</button>
</body>
</html>
index.js
const functions = require('firebase-functions');
exports.testName = functions.https.onRequest((req, res) => {
res.status(200).send(`New Content`);
});
是的,它的调用可调用函数如下所示:https://firebase.google.com/docs/functions/callable