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

Add support for config.isStaging #227

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add support for config.isStaging #227

wants to merge 3 commits into from

Conversation

d30jeff
Copy link

@d30jeff d30jeff commented Nov 27, 2024

Motivation

We have a use case where we have a check to enable rate limiter in non-development environment,
and at the same time disable the Redoc Open API documentation in staging environment.

TL;DR: We have a use case where we want to be able to explicitly check for staging environment.

Changes

const config = cleanEnv({ NODE_ENV: 'staging' }, {})

config.isStage // true
config.isStaging // true

Similar issues:

@d30jeff d30jeff changed the title Add support for process.env.NODE_ENV='staging' Add support for config.isStaging Nov 27, 2024
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 this pull request may close these issues.

1 participant