
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
tcp-node-config
Advanced tools
nodejs的配置中心
启动配置中心并存储本地配置,客户端通过连接配置中心获得实时的配置更新。
将项目下载本地。可以从github上下载。下载地址
node lib/server.js
或者npm run start
也可以使用pm2来启动,项目根目录下提供了一份启动配置。使用pm2 start pm2.json
可以启动。
1.打开当前ip加端口3000的网址:127.0.0.1:3000
。这个端口是可以自己修改的。
2.添加或者修改配置。
3.已连接的客户端会自动更新最新的配置。
客户端需要实例化,传入服务端的地址和创建成功的可执行方法。
const client = new Client({}, function () {
console.log("已连接")
});
获取对应的配置,自动更新远程数据。如果不存在返回null。
let data = await client.config("def", "a")
console.log(data)
可以监听数据变化或者服务停止等方法。
//监听数据变化
client.on("data", function (key, data) {
console.log(key, data)
})
client.on("end", function (key, data) {
console.log("结束")
})
client.on("error", function (key, data) {
console.log("错误")
})
1.多级配置自由获取 2.使用sql、nosql数据库保存信息 3.更完善的权限管理
FAQs
nodejs的配置中心
We found that tcp-node-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.