Commit 2: REST-API für Geräte und Dienste (Zod-Validierung, Drizzle-Repositories)

This commit is contained in:
2026-07-19 01:53:43 +02:00
parent 3a7f423f60
commit a5b998b421
11 changed files with 418 additions and 5 deletions

View File

@@ -2,6 +2,8 @@ import Fastify from "fastify";
import cors from "@fastify/cors";
import { ensureSchema } from "./db/client.js";
import { healthRoutes } from "./routes/health.js";
import { deviceRoutes } from "./routes/devices.js";
import { serviceRoutes } from "./routes/services.js";
const PORT = Number(process.env.PORT ?? 3001);
const HOST = process.env.HOST ?? "0.0.0.0";
@@ -24,6 +26,8 @@ async function main() {
ensureSchema();
await app.register(healthRoutes);
await app.register(deviceRoutes);
await app.register(serviceRoutes);
app.get("/", async () => {
return { name: "LaunchPad API", status: "running" };