I’ve successfully deployed my first couple of version of my test JS Worker via the serverless framework. I’m now attempting to integrate with a third party server (send POST with a password) and I’ve set the password in serverless.yml under ‘environment’ . I’ve done this both for ‘functions’ and ‘provider’ without luck.
If I manually cut-n-paste the script into the workers sandbox, and add the environment variables as globals on the first two lines, e.g.
let DEV_URL = “https://dev.provider.com/endpoint”
let PASSWORD = “abc123”
Then the script works as expected.
I’ve deliberately configured my git repo to ignore ‘.passwd.yml’, which contains these variables so that the secrets never get recorded into git.
I need to have my Workers honor and read the serverless environment variables. Has anyone figured out how to do that?