-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I'm trying to get environment variables working as described in the documentation but not having any lucky.
serverless.yml
service:
name: library
provider:
name: cloudflare
stage: systest
config:
accountId: <somestring>
zoneId: <anotherstirng>
environment:
MY_TEST: HELLO
plugins:
- serverless-cloudflare-workers
functions:
library:
name: library
script: handlers/test
environment:
MY_TEST: WORLD
events:
- http:
url: docs.somedomain.com/*
method: GET
test.js
addEventListener('fetch', event => {
event.respondWith(handle(event))
})
async function handle(event) {
console.log('MY_TEST: ', process.env.MY_TEST);
return new Response(null, { status: 200 });
}
I've tried process.env.MY_TEST and just plain old MY_TEST and no luck.
Metadata
Metadata
Assignees
Labels
No labels