add better sse handling
This commit is contained in:
@@ -23,6 +23,7 @@ import { sseRoutes } from "./sse/routes.js";
|
||||
import { SseService } from "@dpu/shared";
|
||||
import { HomepageService } from "./homepage/service.js";
|
||||
import { homepageRoutes } from "./homepage/routes.js";
|
||||
import fastifySSE from "@fastify/sse";
|
||||
|
||||
const fastify = Fastify().withTypeProvider<ZodTypeProvider>();
|
||||
|
||||
@@ -73,6 +74,8 @@ await fastify.register(fastifyAxios, {
|
||||
},
|
||||
});
|
||||
|
||||
await fastify.register(fastifySSE);
|
||||
|
||||
const haClient = new HomeAssistantClient(fastify.axios.homeassistant);
|
||||
const haService = new HomeAssistantService(haClient);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user