Categorygithub.com/manhtai/golang-mongodb-chat
modulepackage
0.0.0-20201114044257-61c5d39e30f2
Repository: https://github.com/manhtai/golang-mongodb-chat.git
Documentation: pkg.go.dev

# README

A toy chat app

Overview

The app contains 2 parts:

  • Persistent structs: User, Channel, Message

These models holds information about User, Channel & Message from channels when user send messages, data is saved to Mongodb.

  • Websocket structs: Client, Room

These are responsible for opening Websocket connection to receive message from user & broadcast it to all client in a specific channel.

Get started

go get github.com/manhtai/golang-mongodb-chat
dep ensure
go run main.go

SSL & Live reload support

go get github.com/codegangsta/gin
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem
gin --certFile cert.pem --keyFile key.pem --all main.go

# Packages

No description provided by the author
No description provided by the author
No description provided by the author