feat: add server link sharing
This commit is contained in:
parent
ec8eea7cbe
commit
7698a5e6ac
25 changed files with 1586 additions and 1194 deletions
13
packages/server/src/handlers/server.ts
Normal file
13
packages/server/src/handlers/server.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Effect } from "effect"
|
||||
import { HttpApiBuilder } from "effect/unstable/httpapi"
|
||||
import { Api } from "../api"
|
||||
import { ServerInfo } from "../server-info"
|
||||
|
||||
export const ServerHandler = HttpApiBuilder.group(Api, "server.server", (handlers) =>
|
||||
handlers.handle("server.get", () =>
|
||||
Effect.gen(function* () {
|
||||
const info = yield* ServerInfo.Service
|
||||
return { urls: info.urls() }
|
||||
}),
|
||||
),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue