Skip to content

Commit

Permalink
Update client-dist
Browse files Browse the repository at this point in the history
  • Loading branch information
doquangtan committed Dec 22, 2024
1 parent f42d659 commit 58328b5
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 6 deletions.
7 changes: 7 additions & 0 deletions client-dist/socket.io.esm.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client-dist/socket.io.esm.min.js.map

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions client-dist/socket.io.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions client-dist/socket.io.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client-dist/socket.io.min.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions client-dist/socket.io.msgpack.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client-dist/socket.io.msgpack.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ func main() {
return c.SendStatus(200)
})

app.Listen(":3000")
app.Listen(":3300")
}
2 changes: 1 addition & 1 deletion example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#messages > li { padding: 0.5rem 1rem; }
#messages > li:nth-child(odd) { background: #efefef; }
</style>
<script src="/socket.io/socket.io.js"></script>
<script src="/socket.io/socket.io.min.js"></script>
</head>
<body>
<ul id="messages"></ul>
Expand Down
2 changes: 1 addition & 1 deletion listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type EventPayload struct {
Callback *Callback
}

type eventCallback func(payload *EventPayload)
type eventCallback func(data *EventPayload)

type listeners struct {
sync.RWMutex
Expand Down
4 changes: 1 addition & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ func New() *Io {

func (s *Io) Server(router fiber.Router) {
ctx, cancelFunc := context.WithCancel(context.Background())
router.Get("/socket.io.js", func(c *fiber.Ctx) error {
return c.SendFile("../static/socket.io.js")
})
router.Static("/", "../client-dist")
router.Use("/", func(c *fiber.Ctx) error {
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
Expand Down

0 comments on commit 58328b5

Please sign in to comment.