Merge pull request #91 from zhuangya/patch-1

correct npx directive
This commit is contained in:
Kevin Jahns 2022-03-21 13:16:15 +01:00 committed by GitHub
commit 57fba26e7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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