Hey
I'm not sure if I understand the purpose of the environment setting correctly, but when I specify the environment with an according config file, e.g.
node-lambda deploy -f staging.env -e staging
Then node-lambda prepends a process variable to my index.js:
////////////////////////////////////
// "Environment Variables"
process.env["environment"]=staging;
process.env["MY_CUSTOM_VARIABLE"]="my_custom_variable";
////////////////////////////////////
Unfortunately staging is not defined which makes the script fail when trying to run it on lambda.
Is there something that I don't understand properly regarding environments and config files or is this a bug?
What exactly is the purpose of the environment setting?
How I understand it, only the lambda function name will be changed and the process.env["environment"] will get added. Or is there anything else happening?
The thing is, that for different environments (development, staging, production) I want to have different .env files. Is this actually possible?
Thanks for clarifying.
Best,
Sandro
Hey
I'm not sure if I understand the purpose of the environment setting correctly, but when I specify the environment with an according config file, e.g.
node-lambda deploy -f staging.env -e stagingThen node-lambda prepends a process variable to my index.js:
Unfortunately
stagingis not defined which makes the script fail when trying to run it on lambda.Is there something that I don't understand properly regarding environments and config files or is this a bug?
What exactly is the purpose of the environment setting?
How I understand it, only the lambda function name will be changed and the
process.env["environment"]will get added. Or is there anything else happening?The thing is, that for different environments (development, staging, production) I want to have different .env files. Is this actually possible?
Thanks for clarifying.
Best,
Sandro