MCPcopy
hub / github.com/ineo6/hosts / getHosts

Function getHosts

src/cli.ts:44–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42})();
43
44function getHosts() {
45 const result = ipManage.getAllSpeedTester();
46
47 const newHosts: HostData[] = [];
48
49 result.forEach(item => {
50 newHosts.push({
51 name: item.hostname,
52 ip: item.alive
53 })
54 });
55
56 return buildHosts(newHosts);
57}
58
59async function createServer({port}: { port: number }) {
60 const foundPort = await portfinder.getPortPromise({port});

Callers 1

createServerFunction · 0.85

Calls 2

buildHostsFunction · 0.90
getAllSpeedTesterMethod · 0.80

Tested by

no test coverage detected