Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Fix the chat bug by using the same router in server
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolgst committed Mar 21, 2020
1 parent 053c317 commit f6d0061
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f6d0061

Please sign in to comment.