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

Function createOpencode

github/index.ts:231–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229process.exit(exitCode)
230
231function createOpencode() {
232 const host = "127.0.0.1"
233 const port = 4096
234 const url = `http://${host}:${port}`
235 const proc = spawn(`opencode`, [`serve`, `--hostname=${host}`, `--port=${port}`])
236 const client = createOpencodeClient({ baseUrl: url })
237
238 return {
239 server: { url, close: () => proc.kill() },
240 client,
241 }
242}
243
244function assertPayloadKeyword() {
245 const payload = useContext().payload as IssueCommentEvent | PullRequestReviewCommentEvent

Callers 1

index.tsFile · 0.70

Calls 2

createOpencodeClientFunction · 0.90
spawnFunction · 0.50

Tested by

no test coverage detected