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

Add support for zoneless deployments (workers.dev only)

Open davebarrau opened this issue 3 years ago • 3 comments

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!

davebarrau avatar Jun 09 '21 12:06 davebarrau

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.

brianlellis avatar Jan 03 '22 22:01 brianlellis

any update on this ?

SunnyOswal avatar May 10 '22 14:05 SunnyOswal