Initial commit

This commit is contained in:
bipproduction
2025-10-06 19:31:31 +08:00
commit 35caccdd44
18 changed files with 643 additions and 0 deletions

28
src/index.tsx Normal file
View File

@@ -0,0 +1,28 @@
import Elysia from "elysia";
import Swagger from "@elysiajs/swagger";
import html from "./index.html"
const Docs = new Elysia({})
.use(Swagger({
path: "/docs",
}))
const Api = new Elysia({
prefix: "/api",
})
.use(Docs)
.post("/hello", () => "Hello, world!")
const app = new Elysia()
.use(Api)
.get("/*", html)
.listen(3000, () => {
console.log("Server running at http://localhost:3000");
});
export type Server = typeof app;