/dev与/exec文档以及处理不当 [英] /dev vs /exec documentation and mishandling

查看:126
本文介绍了/dev与/exec文档以及处理不当的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们从关于/dev/exec的文档不多的事实开始.如果您有一些我找不到的有价值的信息,我将非常乐意看到它,而无需讽.

Let's start with the fact that there isn't much documentation on /dev vs /exec. If you have some valuable info I can't find, I would totally love to see it, no sarcasm.

据我所知,dev是当前的编辑版本,exec是脚本的最后发布版本(如果您选择的话,则是旧版本).这告诉我,我应该能够编辑独立的Web应用程序脚本,而不必担心它是否会对用户造成干扰,因为如果未发布,则他们看不到更改.除了……实际上并非如此.

From what I can find, dev is the current editing version, and exec is the last published version of your scripts (or an older version if you so choose). This tells me I should be able to edit my standalone web app scripts without worrying about whether it breaks things for the users, because if it isn't published, they don't see the change. Except... this isn't actually the case.

非常容易复制,只需制作一个新的Web应用程序,然后在doGet函数中放置一个console.log("Anything you want").发布并运行,您将在控制台中看到很棒的日志!现在返回,删除控制台行,不发布,然后再次运行.您的控制台输出将不再运行,应有的运行,因为您没有发布.

Very easy to duplicate, just make a new web app, and put a console.log("Anything you want"), in the doGet function. Publish and run, and you will see your log in the console, awesome! Now go back, remove the console line, do not publish, and run it again. Your console output will no longer run, which it should have, because you didn't publish.

所以我的问题是,关于此功能实际上应该如何工作的文档在哪里,因为由于我只能找到有限的信息,所以它似乎坏了.

So my question is, where is the documentation on how this actually should function, because with the limited info I've been able to find, it appears broken.

推荐答案

答案:

exec URL是Web应用程序的当前发布版本,而dev URL运行最新保存的代码,并且只有具有编辑权限的用户才能访问.

Answer:

The exec URL is the current published version of your Web App, whereas the dev URL runs the most recently saved code and can only be accessed by users who have edit access.

摘自Web Apps上的文档:

From the documentation on Web Apps:

点击部署后,您将看到一个新对话框,其中包含一条消息,指示您的项目已成功部署为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.

此对话框为您的应用提供了两个重要的URL:

This dialog provides two important URLs for your app:

第一个标记为当前Web应用程序URL ,并以/exec结尾.该URL用于您应用的已发布版本,基于您保存和部署的最新版本.

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.

第二个链接是标记为最新代码的链接,结尾为/dev.只有对该脚本具有编辑权限的用户才能访问此URL.该应用程序实例始终运行最新保存的代码(不一定是正式版本),并且旨在在开发过程中进行快速测试.

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.

如果您已授予他们访问权限,则可以与要使用该应用程序的用户共享该Web应用程序URL.

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 相同.

Be Aware:

The ID of the web app URL for /exec and /dev endpoints are not the same.

您可以通过查看Web App取消部署模式来看到这一点-Current web app URL部分中提供的URL是/exec URL,而Test web app for your latest code.字符串中提供的链接是/dev URL.请注意,最后一个/之前的ID不相同.

You can see this by viewing the Web App deloyment modal - the URL provided in the Current web app URL section is the /exec URL and the link provided in the Test web app for your latest code. string is the /dev URL. Note the IDs before the final / are not equivalent.

希望对您有帮助!

这篇关于/dev与/exec文档以及处理不当的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆