Skip to content

yusong-offx/study-redis-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Redis-chat

Make chat using fiber, redis
You can test by docker-compose and test.html

git clone (this repo)
docker compose up -d
## open test.html

+ you have to check redis-server dns (/app-server/components/redis.go:14), if you change git clone folder name.



Feature


Connect chat by websocket with user_id and pub/sub by redis.

  • Separate listen and spread
  • Each part works on each goroutine
// redis.subscribe -> websocket(web) 
func rxChat(...)

// websocket(web) -> redis.publish
func txChat(...)

Usage

  • Go
  • Redis
  • Docker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published