Lightweight chat application implemented with golang.
Warning v3.x is still developing.
- New ui(tailwindcss+react)
- New database(mongodb)
git clone https://github.com/OfflineY/LiveChat.git
cd LiveChat
go mod download
go run main.go
Note main.go return example:
{"data": "[main data]", "msg": "[err or nil]"}
[GET] api/groups/search
[PARAMS] ?name=[group_name]&id=[groups_id]
Note take at least one of the two key values. return
data:[...]
andmsg:nil/err
[POST] api/groups/create
[JSON] {"name":"[group_name]"}
Note return
"data":{"group_id": "...", "group_status": "<T/F>", "group_name": "..."}
andmsg:nil/err
[GET] api/groups/[group_id]/messages
Note return
"data":[{"_id":"...","group_id":"...","group_name":"...","msg":"...","msg_type":"[text/image]","send_time":"...","url":"...","user_name":"..."}...]
andmsg:nil/err
[GET] api/groups/[group_id]/info
Note return
"data":"[...]"
and"msg":nil/err
[POST] api/user/login
[JSON] {"user_name": "[user_name]", "password": "[password]"}
Note return
"data":"[...]"
and"msg":nil/err
[POST] api/user/register
[JSON] {"user_name": "[user_name]", "password": "[password]"}
Note return
"data":"[...]"
and"msg":nil/err