DEV Community 👩‍💻👨‍💻

Mossie Chao
Mossie Chao

Posted on

Try using websocket with Go Fiber for the first time

Objective

I want to implement simple chatroom with websocket (in go fiber middleware)


Step (code in every step will be in main.go)

1) make channels for receive commands chan and map channels and user in rooms

chan-and-map

2) write function to receive command from connection

func-listen

3) set endpoint to make connection

set-path

Top comments (0)

We want your help! Become a Tag Moderator.
Check out this survey and help us moderate our community by becoming a tag moderator here at DEV.