update example with listhen 1.7.1

This commit is contained in:
Pooya Parsa
2024-02-25 18:37:52 +01:00
parent 50e9407c2f
commit 8ed7908e3d
4 changed files with 656 additions and 768 deletions

View File

@@ -6,7 +6,8 @@ export const app = createApp();
// Listhen automatically sets up integration!
// Learn more: https://crossws.unjs.io
export const websocket = defineHooks({
export const websocket = {
hooks: defineHooks({
open(peer) {
console.log("[ws] open", peer);
},
@@ -25,4 +26,5 @@ export const websocket = defineHooks({
error(peer, error) {
console.log("[ws] error", peer, error);
},
});
}),
};

View File

@@ -7,8 +7,8 @@
"dev": "listhen --ws -w ."
},
"dependencies": {
"crossws": "latest",
"crossws": "^0.2.0",
"h3": "latest",
"listhen": "latest"
"listhen": "^1.7.1"
}
}

View File

@@ -96,7 +96,7 @@
"eslint-config-unjs": "^0.2.1",
"h3": "^1.10.1",
"jiti": "^1.21.0",
"listhen": "^1.6.0",
"listhen": "^1.7.0",
"prettier": "^3.2.4",
"typescript": "^5.3.3",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.33.0",

1380
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff