When i run functions locally, how would i add .env variables to test? Im using process.env.VAR_NAME and its running fine on the cloud
TL;DR
To add .env variables for testing functions locally, create a .env file in the function code folder. You can also use the `--with-variables` flag to use remote env vars.
Steven
14 Mar, 2025, 16:52
in the folder where your function code is, add a .env file. if you want to use the remote env vars, run with the --with-variables flag