Small & lightweight go webserver & chat client for an instant chat messenging app in your terminal.
You can choose a username and a channel to connect to, and then start chatting with others (or just yourself).
We establish a real-time persistent communication between the client and the server via WebSocket.
WebSocket runs on TCP, configure the host and port in config.go.
The URL is ws://<host>:<port>/channels/<channel>/user/<user>
The server also stores the messages in a SQLite Database, as a backup log. During runtime the database is not read from, just written to.
- Clone this repository
- Install dependencies
go get ./...
And then:
- Run server:
go run ./server
- Run client:
go run ./client
(To skip the prompts, rungo run ./client --dev
)