diff --git a/README.md b/README.md index 75dd12181..12d458fed 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ You can provide config object to `PeerServer` function or specify options for `p | `--sslkey` | `sslkey` | Path to SSL key (string) | No | | | `--sslcert` | `sslcert` | Path to SSL certificate (string) | No | | | `--allow_discovery` | `allow_discovery` | Allow to use GET `/peers` http API method to get an array of ids of all connected clients (boolean) | No | | +| `--debug` | `debug` | Enable debug (boolean) | No | | | `--cors` | `corsOptions` | The CORS origins that can access this server | | | `generateClientId` | A function which generate random client IDs when calling `/id` API method (`() => string`) | No | `uuid/v4` | diff --git a/bin/peerjs.ts b/bin/peerjs.ts index d5321852e..c78604edd 100644 --- a/bin/peerjs.ts +++ b/bin/peerjs.ts @@ -73,6 +73,11 @@ const opts = y demandOption: false, describe: "allow discovery of peers", }, + debug: { + type: "boolean", + demandOption: false, + describe: "enable debug", + }, proxied: { type: "boolean", demandOption: false, @@ -86,6 +91,7 @@ const opts = y }, }) .boolean("allow_discovery") + .boolean("debug") .parseSync(); if (!opts.port) {