this repo has no description www.baileykane.co/
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Create partykit boilerplate

BK610 ab4a554c 7bc8451c

+37
+31
party/index.ts
··· 1 + import type * as Party from "partykit/server"; 2 + 3 + export default class Server implements Party.Server { 4 + constructor(readonly room: Party.Room) {} 5 + 6 + onConnect(conn: Party.Connection, ctx: Party.ConnectionContext) { 7 + // A websocket just connected! 8 + console.log( 9 + `Connected: 10 + id: ${conn.id} 11 + room: ${this.room.id} 12 + url: ${new URL(ctx.request.url).pathname}` 13 + ); 14 + 15 + // let's send a message to the connection 16 + conn.send("hello from server"); 17 + } 18 + 19 + onMessage(message: string, sender: Party.Connection) { 20 + // let's log the message 21 + console.log(`connection ${sender.id} sent message: ${message}`); 22 + // as well as broadcast it to all the other connections in the room... 23 + this.room.broadcast( 24 + `${sender.id}: ${message}`, 25 + // ...except for the connection it came from 26 + [sender.id] 27 + ); 28 + } 29 + } 30 + 31 + Server satisfies Party.Worker;
+6
partykit.json
··· 1 + { 2 + "$schema": "https://www.partykit.io/schema.json", 3 + "name": "personal-website-next-party", 4 + "main": "party/index.ts", 5 + "compatibilityDate": "2025-02-01" 6 + }