ai-qconf-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

ai-qconf-client

A qconf tools for nodejs and want to look for a girlfriend...

Installation

https://npmjs.org/package/ai-qconf-client

$ npm i ai-qconf-client

Usage

import createQconfHost from 'ai-qconf-client'
import { Qconf } from '@blued-core/qconf'
 
const qconf = new Qconf(datum)
qconf.flag = isLocalPro ? 'production' : ''
 
const getQconfHost = (key: string) => {
  if (!(key in datum)) {
    throw new Error(`Can not find the key: [${key}]`)
  }
 
  return createQconfHost({
    key,
    option: qconf,
    path: datum[key].qconf,
  })
}
 
function getTest () {
  const result = getQconfHost('charonRedis')
 
  console.log(result)
  return result
}

Options

// options
interface Config {
  key: string
  option: any
  path: string
  time?: number
}

License

MIT License

Package Sidebar

Install

npm i ai-qconf-client

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

7.98 kB

Total Files

7

Last publish

Collaborators

  • meizikeai
  • kiddy0309
  • erdongjun