cloudflare / serverless-cloudflare-workers

Serverless provider plugin for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
175 stars 37 forks source link

Deploying a worker to additional Cloudflare routes #50

Open drewdecarme opened 4 years ago

drewdecarme commented 4 years ago

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