Skip to content

Commit

Permalink
Add note about custom server to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
apteryxxyz committed Oct 28, 2024
1 parent 80d9429 commit b643b1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cli/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export function SOCKET(

### Using a Custom Server

> [!IMPORTANT]
> Next WS was made to avoid the need for a custom server, if you are using one, you don't need this package and can just use a websocket server directly.
To use a custom server, all you need to do is tell Next WS to use your server instead of creating its own. This can be done by calling the `setHttpServer` and `setWebSocketServer` functions from `next-ws/server` and passing your server instances.

```ts
Expand Down
3 changes: 3 additions & 0 deletions packages/core/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export function SOCKET(

### Using a Custom Server

> [!IMPORTANT]
> Next WS was made to avoid the need for a custom server, if you are using one, you don't need this package and can just use a websocket server directly.
To use a custom server, all you need to do is tell Next WS to use your server instead of creating its own. This can be done by calling the `setHttpServer` and `setWebSocketServer` functions from `next-ws/server` and passing your server instances.

```ts
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export function SOCKET(

### Using a Custom Server

> [!IMPORTANT]
> Next WS was made to avoid the need for a custom server, if you are using one, you don't need this package and can just use a websocket server directly.
To use a custom server, all you need to do is tell Next WS to use your server instead of creating its own. This can be done by calling the `setHttpServer` and `setWebSocketServer` functions from `next-ws/server` and passing your server instances.

```ts
Expand Down

0 comments on commit b643b1f

Please sign in to comment.