serverless-cloudflare-workers
serverless-cloudflare-workers copied to clipboard
Add support for zoneless deployments (workers.dev only)
Hi,
I did a quick implementation to hopefully resolve #36.
I tested the following serverless.yml
file, and was able to successfully deploy the worker just to my workers.dev subdomain:
The additional toggle I added was "zoneless: true/false" which automatically enables the workers.dev route - this can also be used for zone-based functions. I figured this might be useful so you don't have to go into the UI and toggle the worker on after deployment.
service: zone-test
frameworkVersion: '2'
provider:
name: cloudflare
config:
accountId: <account id here>
plugins:
- serverless-cloudflare-workers
functions:
hello:
name: hello
zoneless: true
script: helloWorld # there must be a file called helloWorld.js
Let me know if there's any issues!
Is there an update on when this will be merged into production. Seems legit in setting up prototyped systems not ready for investment as Cloudflare is very generous in daily request limits on the free tier.
any update on this ?