🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

acconfig

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acconfig

config client

npmnpm
Version
1.0.3
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

#使用说明

ACConfigServer客户端

##安装

npm install [--save] acconfig

##使用

var AcConfig = require('acconfig');

var acConfig = new AcConfig({
    version:'1.0.1',
    url:'http://config.domain.com/apps/config',
    env:'test',
    appName:'TestApp',
    appKey:'testAppSecretKey'
});

var testAppConfig = null;

//方法一:
acConfig.loadConfigs(function(err, config){
    if(!err){
        //可以在loadConfigs的回调中直接获取配置
        testAppConfig = config;
    }
}); 

//方法二:
acConfig.loadConfigs();
//如果已经调用过loadConfigs(),可以直接按以下方法使用
testAppConfig = acconfig.configs; 

FAQs

Package last updated on 30 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts