mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-01-06 04:32:37 +00:00
21 lines
519 B
TypeScript
21 lines
519 B
TypeScript
import { dotenvLoad } from "dotenv-mono";
|
|
const dotenv = dotenvLoad();
|
|
|
|
import { Elysia } from "elysia";
|
|
import { swagger } from "@elysiajs/swagger";
|
|
import { db } from "@minikura/db";
|
|
|
|
const app = new Elysia()
|
|
.use(swagger())
|
|
.get("/", async () => {
|
|
return "Hello Elysia";
|
|
})
|
|
.get("/hello", "Do you miss me?")
|
|
.listen(3000, async () => {
|
|
console.log("Server is running on port 3000");
|
|
const result = await db.query.server.findMany();
|
|
console.log(result);
|
|
});
|
|
|
|
export type App = typeof app;
|