https://github.com/jonericcook/gopherchatter
gopherchatter - how gophers chat
https://github.com/jonericcook/gopherchatter
go-grpc-middleware golang grpc grpc-go mongodb
Last synced: about 1 year ago
JSON representation
gopherchatter - how gophers chat
- Host: GitHub
- URL: https://github.com/jonericcook/gopherchatter
- Owner: jonericcook
- Created: 2019-11-24T03:20:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-03T21:30:08.000Z (about 6 years ago)
- Last Synced: 2025-01-13T01:29:12.929Z (about 1 year ago)
- Topics: go-grpc-middleware, golang, grpc, grpc-go, mongodb
- Language: Go
- Homepage:
- Size: 13.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gopher Chatter
## Technologies Used
* Golang
* gRPC
* MongoDB
## Tools Needed
* [MongoDB Compass](https://www.mongodb.com/download-center/compass)
* [BloomRPC](https://github.com/uw-labs/bloomrpc#installation)
* [Docker](https://www.docker.com/get-started)
* [Golang](https://golang.org/dl/)
## Setup Instructions
### MongoDB
* Get MongoDB docker image: `docker pull mongo`
* Start MongoDB docker container for the first time: `docker run -d -p 27017-27019:27017-27019 --name mongodb mongo`
* Stop MongoDB docker container: `docker stop mongodb`
* Start MongoDB docker container: `docker start mongodb`
* Open MongoDB Compass and connect to MongoDB.
### Server
Navigate to `cmd/server` and start the server `go run .`
### BloomRPC
Open BloomRPC and import the gopherchatter protobuf file. This is done by clicking the green plus icon in the top left and navigating to the protobuf file in `internal/platform/protobuf/v0`
## Interacting
Start off by creating a user with the `CreateUser` endpoint. Use the entered credentials to authenticate that user with the `Authenticate` endpoint. Take the returned token and put it in an object as follows:
```
{
"authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzcxNzUyODAsImlhdCI6MTU3NzEzMjA4MCwic3ViIjoiNWUwMTFkOGNiZTQ5NzdmYTNjYzhjNGM3In0.WmWGZNaTIi2agl2_KTu45KV7_zwQO7iM8VrFvIgXbmo"
}
```
Put this object in the `METADATA` field at the bottom of the BloomRPC UI for all endpoint calls besides `CreateUser` and `Authenticate`.