An open API service indexing awesome lists of open source software.

https://github.com/gohouse/chatroom

golang websocket简单聊天室
https://github.com/gohouse/chatroom

chatroom golang gorilla h5 websocket

Last synced: about 2 months ago
JSON representation

golang websocket简单聊天室

Awesome Lists containing this project

README

          

# chatroom
golang简单聊天室, 使用 `h5 + gorilla` 实现, 可自由拓展为多个聊天室

## 在线体现地址
[http://demo.xxjj.cf:9200](http://demo.xxjj.cf:9200)

## 运行
### docker运行
- 安装`docker`和`docker-compose`
```shell script
git clone https://github.com/gohouse/chatroom.git --depth=1
cd chatroom
docker-compose up -d
```
访问: http://localhost:9200 即可使用

### 手动运行
- 安装 golang
- 使用`vgo`进行版本控制,开启`GO111MODULE`
unix/linux 下开启: `export GO111MODULE=on`
windows 下开启: `go env -w GO111MODULE=on`

- 下载并运行`chatroom`
```shell script
git clone https://github.com/gohouse/chatroom.git --depth=1
cd chatroom
go mod tidy && go mod download
go run main.go
```
访问: http://localhost:9200 即可使用

## 效果图
![](static/chatroom.jpg)