Chicko chat is a real time multi room multi user chat using golang, websocket , mongodb with restful api
All that you need is Golang.
$ git clone https://github.com/oldcorvus/chicko_chat.git
$ go mod tidy
$ go build -o chat
$ ./chat --mongoURI="mongodb://localhost:27017"
And navigate to http://127.0.0.1:8080/.
1.build the image:
$ docker-compose build .2.Spin up the containers
$ docker-compose upAnd navigate to http://127.0.0.1:8080/.
-
GET /chats/: to join a room and start chat -
GET /ws/:roomId/:userId/: to start a websocket connection -
POST /start/: register and obtain user id -
POST /user-rooms/: ro get user rooms based on user id -
POST /room-history/: to retrieve messages of room based on room id -
POST /add-user-room/: to register user in room -
POST /room-user-details/: to retrieve user data of a room
to run tests
Controllers :
$ cd controllers
$ go test
Database
$ cd database
$ go test