1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-07-04 18:24:06 +02:00

Handle websocket

This commit is contained in:
Alexandre Iooss
2020-10-20 19:12:15 +02:00
parent ac2f87e936
commit 01efba3e3f
5 changed files with 78 additions and 86 deletions

View File

@ -88,6 +88,7 @@ func Serve(s *messaging.Streams, c *Options) {
mux := http.NewServeMux()
mux.HandleFunc("/", viewerHandler)
mux.Handle("/static/", staticHandler())
mux.HandleFunc("/_ws/", websocketHandler)
mux.HandleFunc("/_stats/", statisticsHandler)
log.Printf("HTTP server listening on %s", cfg.ListenAddress)
log.Fatal(http.ListenAndServe(cfg.ListenAddress, mux))