serverless-serve icon indicating copy to clipboard operation
serverless-serve copied to clipboard

Allow to run functions with env variables correctly populated

Open marcosnils opened this issue 8 years ago • 1 comments

My lambda functions use process.env to read variables configured from the environment. They currently crash because functions are not populating this variables correctly.

This PR calls the Runtime.run function which properly initializes env variables for the specific function.

note: if multiple functions use the same env variables and functions are executed concurrently, unknown errors may happen as process.env will be modified nondeterministically

marcosnils avatar Apr 20 '16 22:04 marcosnils