deploy_feedback icon indicating copy to clipboard operation
deploy_feedback copied to clipboard

One time setup code for all deployments

Open sntran opened this issue 3 years ago • 0 comments

It would be nice to have a way to only execute a setup code once when it's deployed, instead of every time the route is called.

For example, when building Discord bot with slash commands, we usually have the code to register those commands with Discord first. At the moment, we need to do the registration step somewhere else (the example shows using curl) and only take the Deno Deploy server handle interaction requests.

Being able to also do the registration in the Deploy code keeps the list of commands consistent and in one place.

sntran avatar May 03 '22 18:05 sntran