@fangxq/request
Advanced tools
Comparing version 0.0.33 to 0.0.34
@@ -1,1 +0,1 @@ | ||
export async function listen(host: string, port: number, handler: (src: string, req: any) => Promise<any>, wsHandler?: WebSocket): Promise<import('https').Server> | ||
export async function listen(host: string, port: number, handler: (src: string, req: any) => Promise<any>, wsHandler?: (ws:WebSocket)=>Promise<void>): Promise<import('https').Server> |
@@ -35,4 +35,4 @@ const fs = require('fs') | ||
if (wshandler) { | ||
app.ws('/', function (ws, req) { | ||
wshandler(ws) | ||
app.ws('/', async (ws, req) => { | ||
await wshandler(ws) | ||
}) | ||
@@ -39,0 +39,0 @@ } |
{ | ||
"name": "@fangxq/request", | ||
"version": "0.0.33", | ||
"version": "0.0.34", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
2847