examples/pico-echo-server/README.md
Minimal Pico Protocol WebSocket server for testing the pico_client channel.
go run ./examples/pico-echo-server -addr :9090 -token secret
| Flag | Default | Description |
|---|---|---|
-addr | :9090 | Listen address |
-token | (none) | Auth token; empty disables auth |
/wsAuthorization: Bearer <token> header or ?token=<token> query parammessage.send content to stdoutping with pongmessage.create to all connected clientsStart the server:
go run ./examples/pico-echo-server -token mytoken
Configure pico_client in your config.json:
{
"channels": {
"pico_client": {
"enabled": true,
"url": "ws://localhost:9090/ws",
"token": "mytoken",
"session_id": "test-session"
}
}
}
Start picoclaw — the client connects and you can exchange messages interactively via stdin/stdout.