feat: basics #1

Merged
albnnc merged 13 commits from specific-primate into main 2026-07-09 06:42:45 +00:00
Showing only changes of commit 43821c791c - Show all commits
+2 -2
View File
@@ -66,7 +66,7 @@ async function runSSE() {
const url = new URL(req.url || "/", `http://${req.headers.host}`);
if (req.method === "GET") {
const transport = new SSEServerTransport("/message", res);
const transport = new SSEServerTransport("/sse", res);
const server = buildServer();
await server.connect(transport);
@@ -77,7 +77,7 @@ async function runSSE() {
return;
}
if (req.method === "POST" && url.pathname === "/message") {
if (req.method === "POST" && url.pathname === "/sse") {
const sessionId = url.searchParams.get("sessionId") || "";
const transport = transports.get(sessionId);
if (!transport) {