GoTomato/cmd/server/main.go
Sebastian Mark 93376705dc feat: (re)add GoTomato.go
- refactor server package
  - update package name
  - rename `StartServer()` to `Start()`
- (re)add `GoTomato.go` to call `server.Start()`
- update README
2024-10-19 14:32:05 +02:00

17 lines
340 B
Go

package server
import (
"git.smsvc.net/pomodoro/GoTomato/internal/websocket"
"log"
"net/http"
)
func Start() {
http.HandleFunc("/ws", websocket.HandleConnections)
log.Println("Pomodoro WebSocket server started on :8080")
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Fatalf("Error starting server: %v", err)
}
}