File: README.md

package info (click to toggle)
golang-github-centrifugal-centrifuge 0.15.0%2Bgit20210306.f435ba2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,612 kB
  • sloc: javascript: 102; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 700 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Example demonstrates a simple chat with JSON protocol sharing session auth with [gin-gonic](https://github.com/gin-gonic/gin).

Client uses Websocket by default, but you can simply uncomment one line in `chat.html` to use SockJS instead. 

To start example run the following command from example directory:

```
go run main.go
```

Then go to http://localhost:8080/login to see it in action.

Once logged in, it will redirect you to the /chat page where you can see that you are logged in through gin.
There is only one email/pass combination : `email@email.com:password`

[gin-gonic]: https://github.com/gin-gonic/gin

_Credits to the example by FZambia from whom I took most of the centrifuge code_