serverless-cloudflare-workers icon indicating copy to clipboard operation
serverless-cloudflare-workers copied to clipboard

Deploying a worker to additional Cloudflare routes

Open drewdecarme opened this issue 5 years ago • 0 comments

When using Cloudflare's wrangler tool to deploy workers, we have the ability to define the route at which it's deployed. This is extremely helpful to deploy your workers at routes that you specify rather than at the workers.dev subdomain.

Take this wrangler.toml file below. We can define the route at where it gets deployed.

name = "worker-prod"
type = "webpack"
account_id = "youraccountid"
zone_id = "yourzoneid"
route = "https://api.example.com/*"

From what I can tell after reading serverless plugin documentation, there isn't a way to define the route at where your worker is deployed. Am I missing something or does this functionality just not exist.

This is stopping me from using the Serverless Framework as it doesn't seem like there is much parity between what wrangler offers and what the plugin is able to interface

drewdecarme avatar Apr 07 '20 13:04 drewdecarme