1.1.0 • Published 8 years ago
env-switcher v1.1.0
.ENV-SWITCHER
EASY SWICHING .ENV FILES
If you apply .env modules to your service, .env files need to be handled . As you divide your service into micro services, .env files are getting more like tribbles. I hope you can manage your envs easily without any mistakes with this cli.
Install
$ npm install -g env-switcherSetting your project up
Move into your project directory. 1. Initialize env-switcher for your project.
$ envswitch init <env_name>- you can run without env_name parameter, then your default name of env setting is: 'default'
$ envswitch init- Then
.envswitcherwill be automatically added to.gitignoreif it exists.
- For ElasticBeanstalk users: it should be added to
.ebignoremanually.
- Put env files into
.envswitcher. example:
.envswitcher
|-dev
|-prod
|-...You can choose any names as your own envs.
Usage
$ envswitch use <env_name>For example, you wanna change your .env files as development environment.
(When you made your own env files dev in .envswitcher.)
$ envswitch use devPut the command below to swtich environment as production.
$ envswitch use prodAnd you wanna change environment to mytest
$ envswitch use mytestMore Commands
- list your env files
$ envswitch list- update .env file as <env_name> if you modified it
$ envswitch update <env_name>- check the status of your environment
$ envswitch status- help
$ envswitch --helpUpdate Log
v1.1.0
- add a command
update <env_name>