mirror of
https://github.com/sst/opencode.git
synced 2025-08-30 09:47:25 +00:00
11 lines
274 B
TypeScript
11 lines
274 B
TypeScript
import { createOpencodeClient, createOpencodeServer } from "../src/index"
|
|
|
|
const client = createOpencodeClient({
|
|
baseUrl: "http://localhost:4096",
|
|
})
|
|
|
|
await client.event.subscribe().then(async (event) => {
|
|
for await (const e of event.stream) {
|
|
console.log(e)
|
|
}
|
|
})
|