/dev 与 /exec 文档和处理不当
/dev vs /exec documentation and mishandling
让我们从关于 /dev
和 /exec
端点的文档不多这一事实开始。如果你有一些我找不到的有价值的信息,我非常乐意看到它,没有讽刺。
据我所知,dev 是当前的编辑版本,exec 是您脚本的最后发布版本(如果您愿意,也可以是旧版本)。
这告诉我,我应该能够编辑我的独立 Web 应用程序脚本,而不必担心它是否会破坏用户的东西,因为如果它没有发布,他们就看不到更改。但事实并非如此。
非常容易复制,只需制作一个新的网络应用程序,并在 doGet
函数中放入一个 console.log("Anything you want")
。发布并运行,你会在控制台看到你的日志,太棒了!现在回去,删除控制台行,不要发布,然后再次运行。您的控制台输出将不再 运行,它应该有,因为您没有发布。
所以我的问题是,关于这实际上应该如何运作的文档在哪里,因为根据我能找到的有限信息,它似乎已损坏。
答案:
exec
URL 是您的 Web 应用程序的当前发布版本,而 dev
URL 运行最近保存的代码并且只能由具有编辑权限的用户访问。
更多信息:
来自 Web 应用程序的文档:
Once you click Deploy, you'll see a new dialog with a message indicating that your project has been successfully deployed as a web app.
This dialog provides two important URLs for your app:
The first is labeled Current web app URL and ends in /exec
. This URL is for the published version of your app, based on the last version you saved and deployed.
The second is the link labeled latest code and ends in /dev
. This URL can only be accessed by users who have edit access to the script. This instance of the app always runs the most recently saved code — not necessarily a formal version — and is intended for quick testing during development.
You can share the web app URL with those you would like to use your app, provided you have granted them access.
注意:
/exec
和 /dev
端点的 Web 应用 URL 的 ID 是 不是 一样。
您可以通过查看 Web 应用程序部署模式看到这一点 - Current web app URL
部分中提供的 URL 是 /exec
URL 和 link 在 Test web app for your latest code.
字符串中提供的是 /dev
URL。请注意最后的 /
之前的 ID 并不相同。
参考:
让我们从关于 /dev
和 /exec
端点的文档不多这一事实开始。如果你有一些我找不到的有价值的信息,我非常乐意看到它,没有讽刺。
据我所知,dev 是当前的编辑版本,exec 是您脚本的最后发布版本(如果您愿意,也可以是旧版本)。
这告诉我,我应该能够编辑我的独立 Web 应用程序脚本,而不必担心它是否会破坏用户的东西,因为如果它没有发布,他们就看不到更改。但事实并非如此。
非常容易复制,只需制作一个新的网络应用程序,并在 doGet
函数中放入一个 console.log("Anything you want")
。发布并运行,你会在控制台看到你的日志,太棒了!现在回去,删除控制台行,不要发布,然后再次运行。您的控制台输出将不再 运行,它应该有,因为您没有发布。
所以我的问题是,关于这实际上应该如何运作的文档在哪里,因为根据我能找到的有限信息,它似乎已损坏。
答案:
exec
URL 是您的 Web 应用程序的当前发布版本,而 dev
URL 运行最近保存的代码并且只能由具有编辑权限的用户访问。
更多信息:
来自 Web 应用程序的文档:
Once you click Deploy, you'll see a new dialog with a message indicating that your project has been successfully deployed as a web app.
This dialog provides two important URLs for your app:
The first is labeled Current web app URL and ends in
/exec
. This URL is for the published version of your app, based on the last version you saved and deployed.The second is the link labeled latest code and ends in
/dev
. This URL can only be accessed by users who have edit access to the script. This instance of the app always runs the most recently saved code — not necessarily a formal version — and is intended for quick testing during development.You can share the web app URL with those you would like to use your app, provided you have granted them access.
注意:
/exec
和 /dev
端点的 Web 应用 URL 的 ID 是 不是 一样。
您可以通过查看 Web 应用程序部署模式看到这一点 - Current web app URL
部分中提供的 URL 是 /exec
URL 和 link 在 Test web app for your latest code.
字符串中提供的是 /dev
URL。请注意最后的 /
之前的 ID 并不相同。