@kenote/config
v1.0.40
Published
Get profile module.
Downloads
5
Readme
@kenote/config
Get profile module
使用方法
data/config.yaml
host: localhost
port: 3000
site_name: 站点名称
redis:
host: 127.0.0.1
port: 6379
db: 0
data/index.js
module.exports = {
a: 1
}
app.ts
import { loadConfig, asyncRequire } from '@kenote/config'
/**
* 读取配置文件
*/
const config = loadConfig('data')
/**
* 异步导入JS
*/
const ct = asyncRequire('./data')
MIT License.