Files
Minikura/apps/backend/src/index.ts

21 lines
521 B
TypeScript
Raw Normal View History

2024-10-01 19:09:35 +07:00
import { dotenvLoad } from "dotenv-mono";
const dotenv = dotenvLoad();
2024-09-21 13:28:02 +07:00
import { Elysia } from "elysia";
import { swagger } from "@elysiajs/swagger";
2024-10-01 19:10:05 +07:00
import { prisma } from "@minikura/db";
2024-09-21 13:28:02 +07:00
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");
2024-10-01 19:10:05 +07:00
const result = await prisma.server.findMany();
2024-09-21 13:28:02 +07:00
console.log(result);
});
export type App = typeof app;