mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
16 lines
479 B
TypeScript
16 lines
479 B
TypeScript
import { Elysia, t } from "elysia";
|
|
import { CloudflareAdapter } from "elysia/adapter/cloudflare-worker";
|
|
|
|
export default new Elysia({ adapter: CloudflareAdapter })
|
|
.get("/", () => ({ status: "ok" }))
|
|
.get("/health", () => ({ healthy: true, timestamp: new Date().toISOString() }))
|
|
.post(
|
|
"/echo",
|
|
({ body }) => body,
|
|
{
|
|
body: t.Object({ message: t.String() }),
|
|
}
|
|
)
|
|
// .compile() is required — it triggers AoT compilation at startup
|
|
.compile();
|