https://github.com/james2doyle/go-macaron-websocket-example
An example app using Macaron with websockets for Golang
https://github.com/james2doyle/go-macaron-websocket-example
golang macaron websocket
Last synced: 3 days ago
JSON representation
An example app using Macaron with websockets for Golang
- Host: GitHub
- URL: https://github.com/james2doyle/go-macaron-websocket-example
- Owner: james2doyle
- Created: 2017-07-19T23:23:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-31T23:43:04.000Z (almost 9 years ago)
- Last Synced: 2025-01-07T08:49:10.514Z (over 1 year ago)
- Topics: golang, macaron, websocket
- Language: Go
- Size: 157 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
go-macaron websocket example
============================
> An example app using [Macaron](https://github.com/go-macaron/macaron) with websockets for Golang
This package uses the [go-macaron/sockets](https://github.com/go-macaron/sockets) middleware to provide sockets. The middleware is built on [gorilla/websocket](https://github.com/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
