config-env-fg
take env config and conbine config file of config
Last updated a month ago by guang-fang .
ISC · Original npm · Tarball · package.json
$ cnpm install config-env-fg 
SYNC missed versions from official npm registry.

res-msg-fg

take env config and conbine config file of config

Examples

 /** 抓去当前环境下的环境配置,并合并文档中的文件配置,前者覆盖后者
 * @param {object} [payload] - input arguments
 * @param {object} [payload.config={}] - default config object
 * @param {string} [payload.separator=_] - symbol between key path and prefix
 * @param {string} [payload.prefix=CONFIG] - prefix to match target environment
 * @returns {object} parse out config
 *
 * 例子
 * const envConfig = require('config-env-fg');
 * envConfig({ config: { mongo: { db1: 'db1', db: 'db2' } } });
 * 终端 CONFIG_mongo_db=db1 node ./config/index.js
 * 输出{ mongo: { db1: 'db1', db: 'db1' } }
 */

Current Tags

  • 0.1.2                                ...           latest (a month ago)

3 Versions

  • 0.1.2                                ...           a month ago
  • 0.1.1                                ...           a month ago
  • 0.0.1                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 29
Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |