【文件属性】:
文件名称:node-yaml-config:用yaml编写node.js的配置文件
文件大小:17KB
文件格式:ZIP
更新时间:2021-05-13 09:53:35
JavaScript
节点Yaml配置
用yaml编写node.js的配置文件
安装
npm install node-yaml-config
用法
var yaml_config = require ( 'node-yaml-config' ) ;
var config = yaml_config . load ( __dirname + '/config/config.yml' ) ;
console . log ( config ) ;
配置文件
在您的配置文件中:
default :
server :
port : 3000
database :
host : ' localhost '
port : 27017
development :
database :
db : ' dev_db '
test :
database :
db : '
【文件预览】:
node-yaml-config-master
----.travis.yml(126B)
----package.json(700B)
----test()
--------test.js(3KB)
--------config-reload.yml(294B)
--------config.yml(356B)
----package-lock.json(37KB)
----examples()
--------config.yml(296B)
----.gitignore(1KB)
----lib()
--------node-yaml-config.js(1KB)
----Makefile(82B)
----README.md(2KB)