28 lines
526 B
YAML

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