@@ -44,31 +44,20 @@ The gateway accepts WebRTC DataChannel connections from clients and forwards WSC
4444### Install dependencies
4545
4646``` sh
47- cd implementations/js/server
47+ # In the repository root
4848npm install
4949```
5050
5151### Start
5252
5353``` sh
54- # Production
55- npm start
56-
54+ # In the repository root
5755# Development (auto-restart on file change, requires tsx)
58- npm run dev
56+ npm run dev:server # Start the WSC Server
5957```
6058
6159The gateway listens on port ** 4515** by default. This port is used for both the WebSocket signaling server and is referenced as ` ASLS_WSC_PORT ` .
6260
63- ### Environment
64-
65- Copy ` .env ` and adjust as needed:
66-
67- ```
68- # implementations/js/server/.env
69- PORT=4515
70- ```
71-
7261### What the gateway does
7362
7463On startup, the gateway:
@@ -93,14 +82,15 @@ The example is a full interactive protocol explorer that exercises every message
9382### Install dependencies
9483
9584``` sh
96- cd implementations/js/client
85+ # In the repository root
9786npm install
9887```
9988
10089### Start the dev server
10190
10291``` sh
103- npm run dev
92+ # In the repository root
93+ npm run dev:client
10494```
10595
10696Open ` http://localhost:5173 ` in a browser. Enter the gateway host and port (default: ` localhost:4515 ` ) and click ** Connect** .
@@ -117,10 +107,16 @@ The example page provides UI panels for:
117107
118108## Client — Quick Start
119109
110+ Install the dependencies in your project:
111+ ``` bash
112+ npm install -S @asls/wsc-sdk
113+ npm install -S @asls/wsc-client
114+ ```
115+
120116Import the client and the SDK binding:
121117
122118``` js
123- import { WscClient , WSC_REMOTE_STATE , KEEPALIVE_INTERVAL } from ' ./src/main.js ' ;
119+ import { WscClient , WSC_REMOTE_STATE , KEEPALIVE_INTERVAL } from ' @asls/wsc-client ' ;
124120import { WscPacket , WscTransport , WscFlags , WscAddress } from ' @asls/wsc-sdk' ;
125121```
126122
0 commit comments