From f6d006102395896d2d0fe6093c5001d54ca99c2b Mon Sep 17 00:00:00 2001 From: Hugo Lageneste Date: Sat, 21 Mar 2020 17:31:12 +0100 Subject: [PATCH] Fix the chat bug by using the same router in server --- server/serve.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/serve.go b/server/serve.go index ce999c2..cd26ea9 100644 --- a/server/serve.go +++ b/server/serve.go @@ -23,12 +23,10 @@ func Serve(_neuralNetwork network.Network, port string) { // Set the current global network as a global variable neuralNetwork = _neuralNetwork - // Initializes the websocket - http.HandleFunc("/", SocketHandle) - // Initializes the router router := mux.NewRouter() router.HandleFunc("/dashboard", GetDashboardData).Methods("GET") + router.HandleFunc("/", SocketHandle) magenta := color.FgMagenta.Render fmt.Printf("\nServer listening on the port %s...\n", magenta(port))