MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / start

Method start

packages/oauth/test/oauth.test.ts:52–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 host = '';
51
52 async start(): Promise<void> {
53 this.server = createServer((req, res) => {
54 this.handle(req, res);
55 });
56 await new Promise<void>((resolve) => {
57 this.server!.listen(0, '127.0.0.1', () => {
58 resolve();
59 });
60 });
61 const addr = this.server.address();
62 if (addr === null || typeof addr === 'string') {
63 throw new Error('no server address');
64 }
65 this.host = `http://127.0.0.1:${addr.port}`;
66 }
67
68 async stop(): Promise<void> {
69 await new Promise<void>((resolve) => {

Callers

nothing calls this directly

Calls 3

handleMethod · 0.95
listenMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected