| 1 |
Example demonstrates a simple chat with JSON protocol sharing session auth with [gin-gonic](https://github.com/gin-gonic/gin). |
| 2 |
|
| 3 |
Client uses Websocket by default, but you can simply uncomment one line in `chat.html` to use SockJS instead. |
| 4 |
|
| 5 |
To start example run the following command from example directory: |
| 6 |
|
| 7 |
``` |
| 8 |
go run main.go |
| 9 |
``` |
| 10 |
|
| 11 |
Then go to http://localhost:8080/login to see it in action. |
| 12 |
|
| 13 |
Once logged in, it will redirect you to the /chat page where you can see that you are logged in through gin. |
| 14 |
There is only one email/pass combination : `[email protected]:password` |
| 15 |
|
| 16 |
[gin-gonic]: https://github.com/gin-gonic/gin |
| 17 |
|
| 18 |
_Credits to the example by FZambia from whom I took most of the centrifuge code_ |