add register page. add db service

This commit is contained in:
Matteo Rosati
2026-01-25 22:39:46 +01:00
parent 0e1aed27db
commit 54141eb91a
10 changed files with 81 additions and 15 deletions

View File

@@ -1,11 +1,23 @@
import { Hono } from "hono";
import { upgradeWebSocket, websocket } from "hono/bun";
import { DatabaseService } from "@/services/database-service";
const app = new Hono();
app.get("/", async (c) => {
const database = new DatabaseService();
await database.getClient().user.create({
data: {
email: "rosati5.matteo@gmail.com",
name: "Matteo",
},
});
const users = await database.getClient().user.findMany();
return c.json({
message: "ok",
users: users,
});
});