An open API service indexing awesome lists of open source software.

https://github.com/rafaelsouzaribeiro/web-chat-with-websocket-using-a-map-variable-in-go

Web chat with WebSocket using a map variable, notifications for logged-in and logged-out users, and support for emojis in Go and JavaScript.
https://github.com/rafaelsouzaribeiro/web-chat-with-websocket-using-a-map-variable-in-go

clean-architecture emojis golang javascript login logout websocket

Last synced: about 2 months ago
JSON representation

Web chat with WebSocket using a map variable, notifications for logged-in and logged-out users, and support for emojis in Go and JavaScript.

Awesome Lists containing this project

README

          

Web chat with WebSocket and notifications for logged-in and logged-out users and using emojis in Go and JavaScript.



Now, if you want to use a chat with messages and track connected and disconnected users using Redis, check out this project



1 - Run: cmd/main.go

2 - access via browser: http://localhost:8080/chat

2 - being able to open in multiple tabs and connect multiple users

3 - connect user and send message


You can also run it through the dockerfile:

```
FROM golang:1.23 AS builder
WORKDIR /app
COPY . .

RUN go mod download
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-w -s" -o main ./cmd/main.go

FROM scratch
WORKDIR /app

COPY --from=builder /app/main /app/
COPY --from=builder /app/cmd/.env /app/

CMD ["./main"]
```