break: remove /ws from websocket path

This commit is contained in:
Sebastian Mark 2024-11-18 17:43:49 +01:00
parent d21a74388d
commit 3a00563b6a
2 changed files with 3 additions and 3 deletions

View file

@ -28,7 +28,7 @@ func Start() {
flag.Usage = func() { flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", "GoTomato") fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", "GoTomato")
flag.PrintDefaults() flag.PrintDefaults()
fmt.Println("\nPoint your client to 'ws://<listenAddress>:<listenPort>/ws'") fmt.Println("\nPoint your client to 'ws://<listenAddress>:<listenPort>'")
} }
flag.Parse() flag.Parse()
@ -52,7 +52,7 @@ func Start() {
// start connection handler and broadcast // start connection handler and broadcast
r := http.NewServeMux() r := http.NewServeMux()
r.HandleFunc("/ws", websocket.HandleConnection) r.HandleFunc("/", websocket.HandleConnection)
go websocket.SendPermanentBroadCastMessage() go websocket.SendPermanentBroadCastMessage()
helper.Logger.Info("GoTomato started", "version", metadata.GoTomatoVersion) helper.Logger.Info("GoTomato started", "version", metadata.GoTomatoVersion)

View file

@ -64,7 +64,7 @@
<button id="resetButton" style="display: none;">Reset</button> <button id="resetButton" style="display: none;">Reset</button>
<script> <script>
var ws = new WebSocket("ws://localhost:8080/ws"); var ws = new WebSocket("ws://localhost:8080");
var isPaused = false; // Track if the timer is paused var isPaused = false; // Track if the timer is paused
ws.onopen = function () { ws.onopen = function () {