/go-macaron-websocket-example

An example app using Macaron with websockets for Golang

Primary LanguageGo

go-macaron websocket example

An example app using Macaron with websockets for Golang

This package uses the go-macaron/sockets middleware to provide sockets. The middleware is built on gorilla/websocket, so all the kids love it.

Running

Run with go run main.go, then visit http://localhost:4000/

Includes

  • send messages back and forth
  • using/displaying username
  • connect/disconnect messages
  • session-based username
  • server-based disconnect
  • additional route for displaying messages via POST (/webhook)

Example

demo