MCPcopy Index your code
hub / github.com/anomalyco/opencode / server

Function server

packages/opencode/src/cli/tui/worker.ts:54–58  ·  view source on GitHub ↗
(input: { port: number; hostname: string; mdns?: boolean; cors?: string[] })

Source from the content-addressed store, hash-verified

52 return result
53 },
54 async server(input: { port: number; hostname: string; mdns?: boolean; cors?: string[] }) {
55 if (server) await server.stop(true)
56 server = await Server.listen(input)
57 return { url: server.url.toString() }
58 },
59 async checkUpgrade(input: { directory: string }) {
60 await InstanceRuntime.load({ directory: input.directory })
61 await upgrade().catch(() => {})

Callers 1

applyPluginFunction · 0.50

Calls 1

stopMethod · 0.45

Tested by

no test coverage detected