Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

ws.echo

Listens on ws port 7114 and will echo back whatever is sent to the server. Listens on wss port 7114 and will echo back whatever is sent to the server.

Requirements

  • docker compose
  • wscat

Setup

To start the Docker Compose stack defined in the compose.yaml file, use:

docker compose up -d

Install wscat

npm install wscat -g

Verify behavior

wscat -c ws://localhost:7114/ -s echo

Type a Hello, world message and press enter.

output:

Connected (press CTRL+C to quit)
> Hello, world
< Hello, world
wscat -c wss://localhost:7114/ --ca test-ca.crt -s echo

Type a Hello, world message and press enter.

output:

Connected (press CTRL+C to quit)
> Hello, world
< Hello, world

Teardown

To remove any resources created by the Docker Compose stack, use:

docker compose down