Skip to content

Commit b99294e

Browse files
committed
removing inboxstream code
1 parent d94c03a commit b99294e

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

routes.go

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import (
44
"net/http"
55

66
"github.com/gorilla/mux"
7-
"github.factset.com/inbox-stream/chat"
8-
"github.factset.com/inbox-stream/ctrl"
7+
"github.com/rmattam/go-websocket-chat-demo/chat"
98
)
109

1110
// Route : struct to define the route parameters.
@@ -33,13 +32,6 @@ type ChatSockets []ChatSocket
3332
// NewRouter : Initialize the router with the parameters provided.
3433
func NewRouter(redisURL string) *mux.Router {
3534
r := mux.NewRouter().StrictSlash(true)
36-
for _, route := range routes {
37-
r.
38-
Methods(route.Method).
39-
Path(route.Pattern).
40-
Name(route.Name).
41-
Handler(route.HandlerFunc)
42-
}
4335

4436
for _, route := range chatsockets {
4537
route := route
@@ -55,15 +47,10 @@ func NewRouter(redisURL string) *mux.Router {
5547
}
5648

5749
//Setting up file servers
58-
r.PathPrefix("/test/chat").Handler(http.StripPrefix("/test/chat", http.FileServer(http.Dir("./chatUI"))))
50+
r.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("./public"))))
5951
return r
6052
}
6153

62-
// routes : Initialize the routes on initial setup
63-
var routes = Routes{
64-
Route{"Index", "GET", "/", ctrl.Index},
65-
}
66-
6754
var chatsockets = ChatSockets{
6855
ChatSocket{
6956
Name: "Chat1 Websocket Endpoint",

0 commit comments

Comments
 (0)