2018-07-21 21:45:42 +00:00
|
|
|
# chat.go
|
|
|
|
|
2018-07-22 03:58:05 +00:00
|
|
|
Rudimentary go chat server as a fun project.
|
|
|
|
|
|
|
|
# Install
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.coolaj86.com/coolaj86/chat.go.git
|
2018-07-29 22:58:15 +00:00
|
|
|
go get gopkg.in/yaml.v2
|
2018-07-31 07:44:45 +00:00
|
|
|
go get github.com/emicklei/go-restful
|
2018-07-22 03:58:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
2018-07-29 23:04:05 +00:00
|
|
|
**Start the server**
|
2018-07-22 03:58:05 +00:00
|
|
|
|
|
|
|
```bash
|
2018-07-29 23:04:05 +00:00
|
|
|
go run chatserver.go -conf ./config.yml
|
2018-07-22 03:58:05 +00:00
|
|
|
```
|
|
|
|
|
2018-07-29 23:04:05 +00:00
|
|
|
See sample config file at `config.sample.yml`.
|
|
|
|
|
|
|
|
**Connect clients**
|
|
|
|
|
|
|
|
You can connect multiple clients.
|
2018-07-22 03:58:05 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
telnet localhost 4080
|
|
|
|
```
|