42 lines
746 B
YAML

service:
name: hello-world
provider:
name: cloudflare
config:
accountId: CLOUDFLARE_ACCOUNT_ID
zoneId: CLOUDFLARE_ZONE_ID
workers:
hello:
routes:
- example.com/hello/*
foo_script:
routes:
- example.com/foo/*
plugins:
- serverless-cloudflare-workers
functions:
helloWorld:
worker: hello
script: helloWorld
events:
- http:
url: example.com/hello/user
method: GET
headers:
foo: bar
x-client-data: value
foo:
worker: foo_script
script: bar
events:
- http:
url: example.com/foo/bar
method: GET
headers:
foo: bar
x-client-data: value