diff --git a/packages/client/package.json b/packages/client/package.json index cf6bfaf..81b3546 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,7 +1,7 @@ { "name": "@feiyun/client", "repository": "https://github.com/hxg2050/feiyun.git", - "version": "0.0.10", + "version": "0.0.11", "private": false, "type": "module", "main": "./src/index.ts", diff --git a/packages/feiyun/package.json b/packages/feiyun/package.json index 56126e3..c882994 100644 --- a/packages/feiyun/package.json +++ b/packages/feiyun/package.json @@ -1,7 +1,7 @@ { "name": "feiyun", "repository": "https://github.com/hxg2050/feiyun.git", - "version": "0.3.1", + "version": "0.3.2", "private": false, "type": "module", "main": "./src/index.ts", diff --git a/packages/handler/package.json b/packages/handler/package.json index fb59021..e4aeebe 100644 --- a/packages/handler/package.json +++ b/packages/handler/package.json @@ -1,6 +1,6 @@ { "name": "@feiyun/handler", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "type": "module", "main": "./src/index.ts", diff --git a/packages/server/README.md b/packages/server/README.md new file mode 100644 index 0000000..7bc231a --- /dev/null +++ b/packages/server/README.md @@ -0,0 +1,10 @@ +# 飞云服务端 + +## 快速开始 +使用`Feiyun`创建一个长连接服务端应用 +```ts +const app = new Feiyun({ + port: 3000, +}); +app.listen(); +``` diff --git a/packages/server/package.json b/packages/server/package.json index ac88125..70e02b0 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -2,7 +2,7 @@ "name": "@feiyun/server", "repository": "https://github.com/hxg2050/feiyun.git", "private": false, - "version": "0.2.1", + "version": "0.2.2", "type": "module", "main": "./src/index.ts", "engines": { diff --git a/packages/server/src/ws.ts b/packages/server/src/ws.ts index e96dcd4..9c7a0a6 100644 --- a/packages/server/src/ws.ts +++ b/packages/server/src/ws.ts @@ -40,7 +40,7 @@ export const createWebsocketServer = (options: { port?: number, timeout?: number } Bun.serve({ - port: 3000, + port: options.port, fetch(req, server) { if ( server.upgrade(req, {