Firebase 函数不提供函数 URL
Firebase Function not giving Function URL
我正在创建我的第一个 firebase 函数应用程序,我是 going/following 通过 this tutorial/repo
所以我所做的是在我的主文件中 Index.js(在函数文件夹中)
const app = express();
const functions = require("firebase-functions");
const authRoutes = require("./src/routes/auth.js");
const meetupRoutes = require("./src/routes/meetup.js");
const eventbriteRoutes = require("./src/routes/eventbrite.js");
const nonMiddleWareRoutes = require("./src/routes/nonMiddleware.js");
app.use("/", nonMiddleWareRoutes);
app.use("/auth", authRoutes);
app.use("/meetup", meetupRoutes);
app.use("/eventbrite", eventbriteRoutes);
const api = functions.https.onRequest(app);
module.exports = {
api
};
现在回到根文件夹,我们有 firebase.json
,其中只包含这个
{}
和.firebaserc
{
"projects": {
"default": "functions-firebase-2312"
}
}
现在,每当我执行 firebase deploy
时,它都会在终端中记录此
=== Deploying to 'functions-firebase-2312'...
i deploying functions
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (60.3 KB) for uploading
✔ functions: functions folder uploaded successfully
i functions: updating Node.js 8 function api(us-central1)...
✔ functions[api(us-central1)]: Successful update operation.
✔ Deploy complete!
Please note that it can take up to 30 seconds for your updated functions to propagate.
Project Console: https://console.firebase.google.com/project/functions-firebase-2312/overview
但没有给我函数的 url。
知道我做错了什么吗?
您将在首次部署功能时获得 URL。之后,你可以去Firebase控制台查看Functions dashboard中的URL。它们以相当小的字母出现。
我正在创建我的第一个 firebase 函数应用程序,我是 going/following 通过 this tutorial/repo
所以我所做的是在我的主文件中 Index.js(在函数文件夹中)
const app = express();
const functions = require("firebase-functions");
const authRoutes = require("./src/routes/auth.js");
const meetupRoutes = require("./src/routes/meetup.js");
const eventbriteRoutes = require("./src/routes/eventbrite.js");
const nonMiddleWareRoutes = require("./src/routes/nonMiddleware.js");
app.use("/", nonMiddleWareRoutes);
app.use("/auth", authRoutes);
app.use("/meetup", meetupRoutes);
app.use("/eventbrite", eventbriteRoutes);
const api = functions.https.onRequest(app);
module.exports = {
api
};
现在回到根文件夹,我们有 firebase.json
,其中只包含这个
{}
和.firebaserc
{
"projects": {
"default": "functions-firebase-2312"
}
}
现在,每当我执行 firebase deploy
时,它都会在终端中记录此
=== Deploying to 'functions-firebase-2312'...
i deploying functions
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (60.3 KB) for uploading
✔ functions: functions folder uploaded successfully
i functions: updating Node.js 8 function api(us-central1)...
✔ functions[api(us-central1)]: Successful update operation.
✔ Deploy complete!
Please note that it can take up to 30 seconds for your updated functions to propagate.
Project Console: https://console.firebase.google.com/project/functions-firebase-2312/overview
但没有给我函数的 url。
知道我做错了什么吗?
您将在首次部署功能时获得 URL。之后,你可以去Firebase控制台查看Functions dashboard中的URL。它们以相当小的字母出现。