增加任务
This commit is contained in:
33
front-end/nacos-federation/test.ts
Normal file
33
front-end/nacos-federation/test.ts
Normal 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)
|
||||
Reference in New Issue
Block a user