我无法将Firebase云功能部署到特定区域。这是我的代码。
exports.helloWorld1 = functions.region('asia-northeast1').https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
exports.helloWorld2 = functions.region('us-central1').https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
exports.helloWorld3 = functions.region('europe-west1').https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
exports.helloWorld4 = functions.region('us-east1').https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
然后我运行了代码。这就是结果。
如何正确定义云功能的区域?
这种情况与use region other than us-central1 for Google Cloud Functions不同,因为这些功能是在Firebase CLI上部署的,而不是从gcloud执行的常规功能。
#我找到了重要信息。
https://firebase.google.com/docs/functions/locations#http_and_client_callable_functions