module
Version:
v0.0.0-...-4e346df
Opens a new window with list of versions in this module.
Published: May 28, 2020
License: MIT
Opens a new window with license information.
README
¶
websocket-chat
Websocket chat server in go
All connected clients receive text messages in json format:
{
"text":"hello world",
"timestamp":"2020-05-28T15:32:17.510029905Z",
"username":"foobar"
}
Setup
- (Optional) Adjust server port if necessary in .env
cp .env.dist .env and edit SERVER_PORT. 8080 is the default value.
- Run server:
docker-compose up.
- Connect client
ws://localhost:8080/websocket?username=foobar.
- Send json messages like
{"text":"hello world"}
Directories
¶
|
|
|
internal
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.