简体   繁体   English

如何在 firebase 云函数源代码中更新

[英]How to update in firebase cloud function source code

I have a firebase project which has cloud functions, i don't have the original source code and i want to update in the source code.我有一个具有云功能的 firebase 项目,我没有原始源代码,我想在源代码中更新。

i tried to follow the documentation of firebase but it create new folder, i don't know how to get the current source code to update it then deploy it.我试图遵循 firebase 的文档,但它创建了新文件夹,我不知道如何获取当前的源代码来更新它然后部署它。 also i get the source code using " https://console.cloud.google.com/functions " but can't know how to deploy the code after update on it.我也使用“ https://console.cloud.google.com/functions ”获取源代码,但不知道如何在更新后部署代码。

Here is the solution which i follow:这是我遵循的解决方案:

  • Go to the Cloud Console > Cloud Functions list .转到Cloud Console > Cloud Functions 列表
  • Select any of the functions.选择任一功能。
  • Inside the function's detail, click on the Source tab.在函数的详细信息中,单击 Source 选项卡。
  • Then at the bottom, you'll see the "Download.zip" button.然后在底部,您将看到“Download.zip”按钮。
  • Then you can make changes,ie add new function >> add the code for that function and update the index.js (append your work on it to avoid deleting the old functions) then follow the firebase documentation to deploy only one function然后您可以进行更改,即添加新函数 >> 添加该函数的代码并更新 index.js(附加您的工作以避免删除旧函数)然后按照 firebase 文档仅部署一个函数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 具有实时数据库触发器的 Firebase 云功能:如何更新源节点? - Firebase cloud function with realtime database triggers: how to update the source node? 是否可以检索 Firebase Cloud Function 源代码? - Is it possible to retrieve Firebase Cloud Function source code? 如何使用Firebase Cloud功能更新文档值 - How to update a document value with firebase cloud function 如何在firebase云功能中更新文档 - How to update document in firebase cloud function 如何在 Firebase 云 Function 可调用堆栈跟踪中显示 TypeScript 源? - How to show TypeScript source in Firebase Cloud Function callable stacktraces? Firebase Cloud功能Cron更新 - Firebase Cloud Function Cron Update 我无法从 Google Cloud Console(使用 Firebase)查看我的 Cloud Function 的源代码 - I can't view the source code of my Cloud Function from Google Cloud Console( Firebase using) 如何在 VS Code 中调试在文档 onDelete 上触发的 Firebase Cloud Function? - How to debug in VS Code a Firebase Cloud Function that is fired on a document onDelete? 如何测量云 Function 中 Firebase 中特定代码块的执行时间? - How to measure execution time of a particular block of code in Cloud Function for Firebase? Firebase Cloud功能更新数据库中的所有条目 - Firebase Cloud function update all entries in database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM