Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0196730

Browse files
committed
handle websocket
1 parent 28eb80e commit 0196730

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎http/web/router.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package web
33
import (
44
"fmt"
55
v1 "github.com/blobs-io/blobsgame/http/api/v1"
6+
"github.com/blobs-io/blobsgame/http/gateway"
67
"github.com/blobs-io/blobsgame/http/web/routes"
78
"github.com/gofiber/fiber"
89
)
@@ -39,6 +40,9 @@ func Init(port int) {
3940
App.Get("/api/v1/rooms/:id", v1.GetRoom)
4041
App.Get("/api/v1/rooms/:id/players", v1.GetPlayers)
4142

43+
// WebSocket
44+
App.WebSocket("/ws", gateway.Handle)
45+
4246
fmt.Printf("Webserver listening on port %d\n", port)
4347
err := App.Listen(port)
4448
if err != nil {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /