fe-config-center-agent

0.0.4 • Public • Published

前端配置中心(客户端)

前端配置中心客户端,通过客户端获取配置

安装

npm install fe-config-center-agent --save

注意

过程中会全局安装forever,如果失败请手动安装

npm install forever -g

使用

const ConfigCenter = require('fe-config-center-agent')
const configs = new ConfigCenter()

// 获取key的值 
Config.get({
    key:'redis',
    departGroup:'平台-前端',
}).then(res=>{
    console.log(res)
})

// 创建key value
Config.create({
    key:'redis',
    departGroup:'平台-前端',
    value:'http://localhost:1234'
})

// 更新key value
Config.update({
    key:'redis',
    departGroup:'平台-前端',
    value:'http://localhost:1234'
})

// 删除key value
Config.delete({
    key:'redis',
    departGroup:'平台-前端',
})

Readme

Keywords

none

Package Sidebar

Install

npm i fe-config-center-agent

Weekly Downloads

0

Version

0.0.4

License

UNLICENSED

Unpacked Size

408 kB

Total Files

34

Last publish

Collaborators

  • harryzq