sse => ws

This commit is contained in:
Darius
2026-02-06 10:08:36 +01:00
parent 18708add17
commit 5866216e36
4 changed files with 189 additions and 46 deletions

View File

@@ -19,12 +19,12 @@ import { HomeAssistantService } from "./homeassistant/service.js";
import { TidalClient } from "./tidal/client.js";
import { TidalService } from "./tidal/service.js";
import { tidalRoutes } from "./tidal/routes.js";
import { sseRoutes } from "./sse/routes.js";
import { sseRoutes } from "./websocket/routes.js";
import { SseService } from "@dpu/shared";
import { HomepageService } from "./homepage/service.js";
import { homepageRoutes } from "./homepage/routes.js";
import fastifySSE from "@fastify/sse";
import fastifyCors from "@fastify/cors";
import fastifyWebsocket from "@fastify/websocket";
const fastify = Fastify().withTypeProvider<ZodTypeProvider>();
@@ -81,7 +81,7 @@ await fastify.register(fastifyAxios, {
},
});
await fastify.register(fastifySSE);
await fastify.register(fastifyWebsocket);
const haClient = new HomeAssistantClient(fastify.axios.homeassistant);
const haService = new HomeAssistantService(haClient);