Skip to content

Programmatically setting environment #4

Description

@peterleiva

Sometimes maybe useful to set the environment programmatically, instead of relying on NODE_ENV it can be set using the API.

The API can add another function which set an environment according to any given string. An alias for common operations can be useful as well. Example:

env.set("development")
env.setDev()
env.set("prod")
env.setProd()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions