Skip to content

Commit 4544358

Browse files
committed
rtd sse
1 parent 27bb40a commit 4544358

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

server/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ app.use(
1818
);
1919

2020
app.use(
21-
'/events',
21+
'/rtd',
2222
cors({
2323
origin: CORS,
2424
}),
2525
);
2626

2727
app.post('/join/:id', joinHandler);
28-
app.get('/events', sseHandler);
28+
app.get('/rtd', sseHandler);
2929

3030
serve(
3131
{

src/network/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const endpoints = {
99
request: simplePlayerSchema,
1010
},
1111
},
12-
'/events': {
12+
'/rtd': {
1313
sse: {
1414
response: z.discriminatedUnion('type', [
1515
z.object({

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Landing() {
1515
let closer: VoidFunction | null = null;
1616

1717
createEffect(async () => {
18-
const [errListen, close] = await httpClient.sse('/events', null, ([err, data]) => {
18+
const [errListen, close] = await httpClient.sse('/rtd', null, ([err, data]) => {
1919
if (err) {
2020
return;
2121
}

0 commit comments

Comments
 (0)