增加任务

This commit is contained in:
编码猿
2025-09-20 02:26:42 +08:00
parent 32d40e1fa3
commit e038fdb965
14 changed files with 356 additions and 129 deletions

View File

@@ -0,0 +1,33 @@
// import {NacosNamingClient} from 'nacos';
//
// const logger = console;
//
// const client = new NacosNamingClient({
// logger,
// serverList: '192.168.31.100:8848', // replace to real nacos serverList
// namespace: 'public',
// });
//
// await client.ready();
//
// // registry instance
// await client.registerInstance('main-app', {
// ip: '192.168.31.101',
// port: 1300,
// });
// @ts-ignore
import { nacosServiceManage } from "./src/nacosServiceManage.ts";
const client = new nacosServiceManage({
serverList: '192.168.31.100:8848',
serviceName: 'main-app',
port: 1300
})
setTimeout(() => {
client.find("main-app").then((client) => {
console.log("client ---- : ", client);
})
}, 3000)