Skip to content

feat: add process.env.TRIGGER_ENV #1557

@youminkim

Description

@youminkim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions