DEV Community

Perm Chao
Perm 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)