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 · May be fixed by #1733
Open

feat: add process.env.TRIGGER_ENV #1557

youminkim opened this issue Dec 12, 2024 · 0 comments · May be fixed by #1733

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

Shahor added a commit to Shahor/trigger.dev that referenced this issue Feb 26, 2025
Shahor added a commit to Shahor/trigger.dev that referenced this issue Feb 26, 2025
Shahor added a commit to Shahor/trigger.dev that referenced this issue Feb 26, 2025
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

Successfully merging a pull request may close this issue.

1 participant