mandar1jn
Explore posts from serversCDCloudflare Developers
•Created by mandar1jn on 4/5/2024 in #workers-help
Any way to run code once on deploy?
I'm currently developing a discord bot that, due to only needing to handle slash commands, will run on a cloudflare worker. Is there a way to run a part of the worker only once right after deployment? I need that to update the commands on discords end. I can do it in the github deployment, but since I can't get node to allow directory imports and imports without ".js"at the end (using typescript), I would prefer a cloudflare-native approach
4 replies