Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package websocket
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
func OpenWebsocketServer(s Server) {
|
||||
s.Upgrader = &websocket.Upgrader{
|
||||
CheckOrigin: func(r *http.Request) bool { return true },
|
||||
}
|
||||
|
||||
http.HandleFunc("/ports", s.ports)
|
||||
http.HandleFunc("/exerciseIds", s.exerciseIds)
|
||||
http.HandleFunc("/partyData", s.partyData)
|
||||
http.HandleFunc("/participantHandler", s.participantHandler)
|
||||
log.Fatal("Websocket Server - Error while serving websockt server:", http.ListenAndServe("localhost:6969", nil))
|
||||
}
|
||||
Reference in new issue
Block a user