@coocaa-rn-jsplugin/nacos-env
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

nacos-env

load async nacos configuration to environment and then run the specified command

Getting started

npm install @node-ai/nocos-env

Create nacos config file

// should be written in properties type
// .conf.nacos
NACOS_SERVER=ip:port
NACOS_TENANT=namespace-id
NACOS_DATA_ID=data-id
NACOS_GROUP=group

Get nacos config and run command

nacos-env -f/--nacos-config-file .conf.nacos -c "command --flag1 --flag2 arg1 arg2"

More about nacos-env

nacos-env -h/--help
Usage: nacos-env [options]

set the environment variables first, and then run a command or program

Options:
  -v, --version                   output the current version
  -s, --nacos-server <address>    nacos server address, will be ignored while -f/--nacos-config-file is set
  -t, --nacos-tenant <id>         nacos namespace id, will be ignored while -f/--nacos-config-file is set
  -d, --nacos-data-id <id>        nacos data id, will be ignored while -f/--nacos-config-file is set
  -g, --nacos-group <group>       nacos group, will be ignored while -f/--nacos-config-file is set
  -f, --nacos-config-file <path>  nacos configuration file, written by properties type
  -p, --nacos-parser <parser>     nacos content will be parsed by the specified parser (choices: "properties", "json", "xml", "yaml", default: default to be parsed as properties)
  -c, --command <command>         command to run when the environment variables are set up, command should be enclosed by quotes(") if one or more spaces are contained in
  -h, --help                      display help for command

Dependents (0)

Package Sidebar

Install

npm i @coocaa-rn-jsplugin/nacos-env

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

14.6 kB

Total Files

12

Last publish

Collaborators

  • wuzhifeng
  • guanhaowen