Listens on ws port 7114 and will echo back whatever is sent to the server, broadcasting to all clients.
- docker compose
- wscat
To start the Docker Compose stack defined in the compose.yaml file, use:
docker compose up -dConnect each client first, then send Hello, one from first client, then send Hello, two from second client.
wscat -c ws://localhost:7114/ -s echoType a Hello, one message and press enter.
output:
Connected (press CTRL+C to quit)
> Hello, one
< Hello, one
< Hello, two
wscat -c wss://localhost:7114/ --ca test-ca.crt -s echoType a Hello, two message and press enter.
output:
Connected (press CTRL+C to quit)
< Hello, one
> Hello, two
< Hello, two
To remove any resources created by the Docker Compose stack, use:
docker compose down