verani 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ import { defineRoom, createActorHandler } from "verani";
|
|
|
30
30
|
// Define your room with lifecycle hooks
|
|
31
31
|
export const chatRoom = defineRoom({
|
|
32
32
|
name: "chat",
|
|
33
|
+
websocketPath: "/chat",
|
|
33
34
|
|
|
34
35
|
onConnect(ctx) {
|
|
35
36
|
console.log(`User ${ctx.meta.userId} connected`);
|
|
@@ -56,10 +57,7 @@ export const chatRoom = defineRoom({
|
|
|
56
57
|
});
|
|
57
58
|
|
|
58
59
|
// Create the Durable Object class
|
|
59
|
-
const ChatRoom = createActorHandler(chatRoom);
|
|
60
|
-
|
|
61
|
-
// Export it - the name must match wrangler.jsonc
|
|
62
|
-
export { ChatRoom };
|
|
60
|
+
export const ChatRoom = createActorHandler(chatRoom);
|
|
63
61
|
```
|
|
64
62
|
|
|
65
63
|
### Wrangler Configuration
|