Skip to content
/ go-chat Public

A simple chat with and persistent conversations and implemented using websockets

License

Notifications You must be signed in to change notification settings

Lebski/go-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-chat

go-chat is a realtime chat example ebedded in a rest server. The application is extremely easy to use, so you can get started right away and you don't have to install a database or anything like that. Features:

  • Persistent Conversations
  • Users with accounts
  • Websockets for realtime interaction

example

⚠️ Disclaimer! ⚠️

Security

No security features are supported. But: The chat application is desigend to be simplistic so you can integrate it into your existing project without changing to much. I recommend using

  • Encrypted Coockies 🍪
  • Middleware for authentication
  • In-memory sessions

Please make sure you do not use URL parameters as authentication or resource allocation. further links: Gorilla securecookie, Gorilla securecookie, redis

Databases

I do not use any database but store everything inside memory, which means that everything (including chat history) ist lost when you restart the application. It should be easy to replace the maps with the database of your choice.

Usage

$ go get github.com/gorilla/mux
$ go get github.com/gorilla/websocket
$ go get github.com/google/uuid
$ go build . 
$ ./go-chat

About

A simple chat with and persistent conversations and implemented using websockets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published