confyamlYaml 格式配置全局载入库
Yaml格式配置全局载入库,将单个或者多个yaml格式的配置文件映射到系统环境变量中。只需在入口文件中包含confyaml包,就可以在同一项目不同文件中获取配置项,无需多次导入读取yaml文件。
安装
通过npm或者yarn下载
~ npm i --save[-dev] confyaml # or ~ yarn add [--dev] confyaml
使用
config.yaml
app_name: here is app name
tips: config.yaml 文件如果在项目的根目录,那么在入口文件导入如下代码即可。
require("confyaml").config()
app.js
// in app.js require("confyaml").config(); // *default read root directory config.yaml* // or require("confyaml").config({path: "./config.yaml"}) // or require("confyaml").config({ path: [ "./config.yaml", "./database.yaml" ] }) // in other files. console.log(process.env.get("app")) // -> here is app name
评论
XDiamond全局配置中心
简介全局配置中心,存储应用的配置项,解决配置混乱分散的问题。名字来源于淘宝的开源项目diamond,前面加上一个字母X以示区别。wiki设计思路特性所见即所得,在管理界面上看到的所有配置即项目运行时的
XDiamond全局配置中心
0
WallarooC++依赖注入库
Wallaroo是一个C++的依赖注入库,您可以使用字符串来创建对象,你也可以从配置文件中加载“对象图”。示例代码:#include "wallaroo/catalog.h"using namespa
WallarooC++依赖注入库
0
Assimp3D 模型导入库
OpenAssetImportLibrary(简称Assimp)是一个用于导入和导出各种3D模型格式的库,包括场景后处理,以生成缺失的渲染数据。可将40多种3D文件格式加载到一个统一且干净的数据结构中
Assimp3D 模型导入库
0
autumnframeworkC++依赖注入库
AutumnFramework项目是用C++实现依赖注入。它支持属性setter注入和构造器注入。它可以在多个平台上编译。它支持POCO(普通的C++对象)并且对你创建类无约束。它不会入侵你的代码。
autumnframeworkC++依赖注入库
0