node-disconf-client基本配置

Posted on 2018-05-09 13:53  凌晨四点的北京  阅读(291)  评论(0)    收藏  举报

node-disconf-client

需要cppm install node-disconf-client

var  disconf  = require ' node-disconf-client ' ; 

disconf.init({
    path'./config',//本地文件目录
    filename'disconf.properties'//默认为disconf.properties,可不写
}{
    dist_file'./config/remote.properties',//需要写入的目标文件路径
    conf_item_name'demo',//需要远程获取的配置项
    conf_server_host'127.0.0.1:8000',//服务器地址
    app'DEFAULT_APP',//服务器名称
    version'DEFAULT_VERSION',//版本
    env'DEFAULT_ENV',//那哥环境
});

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3