📜  npm install -g win-node-env (1)

📅  最后修改于: 2023-12-03 15:03:17.281000             🧑  作者: Mango

npm install -g win-node-env

Introduction

As a programmer, you may have come across the issue of not being able to use certain command-line tools on Windows due to environment variables. Win-node-env is a lightweight npm module that solves this problem.

Features
  • Sets and updates environment variables on Windows
  • Works with Windows command prompt, PowerShell, and Git Bash
  • Supports both user and system environment variables
  • Allows for easy switching between different environments
Installation

To install win-node-env globally, simply run the following command:

npm install -g win-node-env
Usage

To use win-node-env, simply use the win-node-env command followed by the environment variable you want to set, along with its value.

For example, to set the NODE_ENV variable to production, run the following command:

win-node-env NODE_ENV=production

You can also specify the environment to use by prefixing the command with the environment name. For example:

production win-node-env NODE_ENV=production

This will set the NODE_ENV variable to production for the production environment.

Conclusion

Win-node-env is a simple yet powerful npm module that makes it easy for Windows users to work with environment variables. Try it out and see how it can improve your workflow today!