commit
57fba26e7a
@ -24,7 +24,7 @@ This repository implements a basic server that you can adopt to your specific us
|
|||||||
Start a y-websocket server:
|
Start a y-websocket server:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
HOST=localhost PORT=1234 npx y-websocket-server
|
HOST=localhost PORT=1234 npx y-websocket
|
||||||
```
|
```
|
||||||
|
|
||||||
### Client Code:
|
### Client Code:
|
||||||
@ -101,10 +101,10 @@ wsOpts = {
|
|||||||
Start a y-websocket server:
|
Start a y-websocket server:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
HOST=localhost PORT=1234 npx y-websocket-server
|
HOST=localhost PORT=1234 npx y-websocket
|
||||||
```
|
```
|
||||||
|
|
||||||
Since npm symlinks the `y-websocket-server` executable from your local `./node_modules/.bin` folder, you can simply run npx. The `PORT` environment variable already defaults to 1234, and `HOST` defaults to `localhost`.
|
Since npm symlinks the `y-websocket` executable from your local `./node_modules/.bin` folder, you can simply run npx. The `PORT` environment variable already defaults to 1234, and `HOST` defaults to `localhost`.
|
||||||
|
|
||||||
### Websocket Server with Persistence
|
### Websocket Server with Persistence
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user