Skip to content

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

License

Notifications You must be signed in to change notification settings

bluedapp/ai-qconf-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-qconf-client

npm version

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

Installation

$ 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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published