i need to check if the branch is staging or production in a lambda function, how should it be done ?
You could use
process.env.CONTEXT and that would give you if it’s production or branch-deploy or any context that you set in
I am not getting that context value in env how to set it in the toml file ?
You’re probably looking for this: GitHub - bencao/netlify-plugin-inline-functions-env: Inline build time environment variable values into netlify function code so that it becomes available at runtime.
will have a look many thanks
worked like a charm, I spent the better part a day trying to get this thanks @hrishikesh