sync
This commit is contained in:
parent
070c1679e4
commit
d4e51e04b3
3 changed files with 6 additions and 5 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { createAdaptorServer } from "@hono/node-server"
|
||||||
import { Hono } from "hono"
|
import { Hono } from "hono"
|
||||||
import { Instance } from "../../project/instance"
|
import { Instance } from "../../project/instance"
|
||||||
import { InstanceBootstrap } from "../../project/bootstrap"
|
import { InstanceBootstrap } from "../../project/bootstrap"
|
||||||
|
|
@ -55,10 +56,10 @@ export namespace WorkspaceServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Listen(opts: { hostname: string; port: number }) {
|
export function Listen(opts: { hostname: string; port: number }) {
|
||||||
return Bun.serve({
|
const server = createAdaptorServer({
|
||||||
hostname: opts.hostname,
|
|
||||||
port: opts.port,
|
|
||||||
fetch: App().fetch,
|
fetch: App().fetch,
|
||||||
})
|
})
|
||||||
|
server.listen(opts.port, opts.hostname)
|
||||||
|
return server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export namespace Plugin {
|
||||||
get serverUrl(): URL {
|
get serverUrl(): URL {
|
||||||
throw new Error("Server URL is no longer supported in plugins")
|
throw new Error("Server URL is no longer supported in plugins")
|
||||||
},
|
},
|
||||||
$: Bun.$,
|
$: () => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const plugin of INTERNAL_PLUGINS) {
|
for (const plugin of INTERNAL_PLUGINS) {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export const ProjectRoutes = lazy(() =>
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
async (c) => {
|
async (c) => {
|
||||||
const projects = await Project.list()
|
const projects = Project.list()
|
||||||
return c.json(projects)
|
return c.json(projects)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue