feat(core): basic implementation of remote workspace support (#15120)

This commit is contained in:
James Long
2026-02-27 15:36:39 -05:00
committed by GitHub
parent a94f564ff0
commit c12ce2ffff
26 changed files with 2153 additions and 65 deletions

View File

@@ -0,0 +1,24 @@
import { Hono } from "hono"
import { SessionRoutes } from "../../server/routes/session"
import { WorkspaceServerRoutes } from "./routes"
export namespace WorkspaceServer {
export function App() {
const session = new Hono()
.use("*", async (c, next) => {
if (c.req.method === "GET") return c.notFound()
await next()
})
.route("/", SessionRoutes())
return new Hono().route("/session", session).route("/", WorkspaceServerRoutes())
}
export function Listen(opts: { hostname: string; port: number }) {
return Bun.serve({
hostname: opts.hostname,
port: opts.port,
fetch: App().fetch,
})
}
}