Skip to content

Programmatically setting environment #4

@peterleiva

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()

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