/dev vs /exec documentation and mishandling

后端 未结 1 618
一向
一向 2021-01-27 02:15

Let\'s start with the fact that there isn\'t much documentation on /dev vs /exec endpoints. If you have some valuable info I can\'t find, I would total

相关标签:
1条回答
  • 2021-01-27 02:48

    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.

    More Information:

    From the documentation on Web Apps:

    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.

    Be Aware:

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

    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.

    I hope this is helpful to you!

    Reference:

    • Web Apps | Apps Script | Google Developers
    0 讨论(0)
提交回复
热议问题