Skip to main content

Function: getEnvironment()

getEnvironment(): string

Defined in: shared/utils/environment.ts:60

Get the current environment name safely.

Returnsโ€‹

string

Environment name or 'unknown' if not set

Remarksโ€‹

Returns 'unknown' as fallback to indicate unspecified environment state. This is intentionally different from getNodeEnv() which assumes 'development' for safety in development workflows. Use this when you need to detect unspecified environments, use getNodeEnv() when you need development defaults.