0.0.2 • Published 6 years ago

bright-config v0.0.2

Weekly downloads
2
License
Apache
Repository
github
Last release
6 years ago

bright-config

Based on the default configuration file, the change of individual configuration is determined based on the running environment. Finally return an config object.

基于默认配置文件,根据运行环境确定单个配置的更改。最后返回一个配置对象。

Installation 安装

Install using npm

npm install bright-config

Example 使用例子

Basic usage:

const path = require('path')
const brightConfig = require('bright-config')

const config = brightConfig(path.join(__dirname, './config')) // config配置目录的路径

console.log(config)

Tests 测试

Run tests using npm test

npm test

npm test-test

npm test-pro

config目录例子

----config
--------default // 必须存在默认配置目录
------------app.js
------------db.js
------------oss.js
--------development
------------app.js
------------db.js
------------oss.js
--------production
------------app.js
------------oss.js
--------test
------------app.js
0.0.2

6 years ago

0.0.1

6 years ago