Files
Kit Langton cf1acfd2fa chore: upgrade Effect to rc.118
Move effect/unstable/* imports to their top-level entry points
(effect/unstable/httpapi becomes effect/http-api), migrate Encoding helpers
to effect/encoding Base64 and Base64Url, rename Schema.isStartsWith to
Schema.isStartingWith, import Arbitrary from effect, and update the HttpApi
codegen templates, regenerated clients, and documentation.
2026-10-02 14:17:30 -07:00

21 lines
631 B
TypeScript

import { Effect } from "effect"
import { HttpServer } from "effect/http"
import { ServerProcess } from "../../src/process"
export const startServer = Effect.fnUntraced(function* (directory: string) {
const server = yield* ServerProcess.start<never, never>({
hostname: "127.0.0.1",
port: 0,
password: "secret",
app: { version: "test-version" },
database: { path: ":memory:" },
config: { directory },
fs: { filewatcher: false },
models: { fetch: false },
})
return {
base: HttpServer.formatAddress(server.address),
headers: { authorization: `Basic ${btoa("opencode:secret")}` },
}
})