Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add process.env.TRIGGER_ENV #1557

Open
youminkim opened this issue Dec 12, 2024 · 0 comments
Open

feat: add process.env.TRIGGER_ENV #1557

youminkim opened this issue Dec 12, 2024 · 0 comments

Comments

@youminkim
Copy link

youminkim commented Dec 12, 2024

Is your feature request related to a problem? Please describe.

We frequently check environment (e.g. production, staging) but there is no default environment variable from trigger.dev runtime.

Describe the solution you'd like to see

Add process.env.TRIGGER_ENV with production, staging and development.

example usage

export function isProd() {
  return (
    process.env.VERCEL_ENV === 'production' || 
    process.env.TRIGGER_ENV === 'production'
  );
}

Describe alternate solutions

Add MY_TRIGGER_ENV manually into project environment settings.

Additional information

https://discord.com/channels/1066956501299777596/1316791509818937354/1316791509818937354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant