https://github.com/lambels/go-room-chat
Simple real-time room chat built with golang.
https://github.com/lambels/go-room-chat
golang real-time webscocket
Last synced: 11 months ago
JSON representation
Simple real-time room chat built with golang.
- Host: GitHub
- URL: https://github.com/lambels/go-room-chat
- Owner: Lambels
- Created: 2021-08-09T12:28:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-15T10:51:48.000Z (almost 5 years ago)
- Last Synced: 2025-06-03T22:43:39.855Z (about 1 year ago)
- Topics: golang, real-time, webscocket
- Language: Go
- Homepage:
- Size: 4.85 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[](https://golang.org)

# Go Room Chat
Room chat implemented with go using Gorilla mux and Gorilla websockets
## Build
Mac/Linux:
~~~
go build -o GoRoomChat ./cmd/web/*.go
~~~
Windows:
~~~
go build -o GoRoomChat.exe ./cmd/web/.
~~~
For particular platform:
~~~
env GOOS=linux GOARCH=amd64 go build -o GoRoomChat ./cmd/web/*.go
~~~
## Requirements
GoRoomChat Requires:
- A running mysql database
## Run
Make sure the database is running.
(If you are running on localhost with a database with no password default config should be ok)
Run with flags:
~~~
./GoRoomChat \
-dbUser='root' \
-dbName='testdb' \
-dbPass='' \
-dbPort='3306' \
-dbHost='localhost' \
-stName='sessions' \
-port=':8080'
~~~
## All Flags
~~~
./GoRoomChat -help
Usage of GoRoomChat:
-dbHost string
Database host (default "localhost")
-dbName string
Database name (default "testdb")
-dbPass string
Database password
-dbPort string
Database port (default "3306")
-dbUser string
Databse user (default "root")
-port string
Port on wich the server listens on (default ":8080")
-stName string
Sessions table name (default "sessions")
~~~