- 新增 nodejs-client 模块,提供 ConfigClient 配置拉取、定时同步、变更监听 - 使用 Node.js 内置 crypto 模块实现 AES 解密,零外部依赖 - 新增 nodejs-client-demo Express 示例应用,端口 8083 - 更新 README.md,补充 Python 和 Node.js 客户端使用说明 - 修复 fetchAllConfigs API 响应格式判断逻辑
13 lines
417 B
JavaScript
13 lines
417 B
JavaScript
export class Config {
|
|
constructor(options = {}) {
|
|
this.baseUrl = options.baseUrl || '';
|
|
this.appName = options.appName || '';
|
|
this.env = options.env || 'dev';
|
|
this.version = options.version || 'latest';
|
|
this.token = options.token || '';
|
|
this.syncInterval = options.syncInterval || 60;
|
|
this.ignoreGlobal = options.ignoreGlobal || false;
|
|
this.cacheDir = options.cacheDir || '.';
|
|
}
|
|
}
|