https://github.com/solutionstack/jobsity-demo
https://github.com/solutionstack/jobsity-demo
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/solutionstack/jobsity-demo
- Owner: solutionstack
- Created: 2023-01-03T00:41:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-25T02:58:52.000Z (over 2 years ago)
- Last Synced: 2025-05-24T23:44:49.965Z (29 days ago)
- Language: Go
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo chat APP (Go + websocket)
## How to run
#### Clone repo
```shell
git clone https://github.com/solutionstack/jobsity-demo.git
```
#### Then
```shell
cd ./jobsity-demo && go mod tidy
```#### RUN
```shell
go run main.go
```#### ENV
```shell
When running dirrectly ensure the fllowing AMQP/RabbitMQ parameters are avalable in the enviromentAMQ_HOST=
AMQ_USER=
AMQ_PASS=For a docker build the following --build-arg(s) should be passed
ARG_AMQ_HOST=
ARG_AMQ_USER=
ARG_AMQ_PASS=
```This starts the app http server on port `8000` and websocket server on port `6001`
Visit `http://localhost:8000` in your browser which should take you to the register and sign in page
On login, you'd be redirected to the chat interface
To get stock quotes, type a slash command in the format `/stock=stockcode`
An unlimited number of users can be logged in on different browsers or tabs
### Docker build
```shelle.g
docker build -t jobsity-demo .
docker run -p 8000:8000 -p 6001:6001 jobsity-demoThen open localhost:8000 in your browser
```### Libraries used
```shell
github.com/gobwas/ws
github.com/go-chi/chi
github.com/rs/zerolog
github.com/pkg/errors
```