This is a demo and template for backend assignment of 2023 TikTok Tech Immersion.
Requirement:
- golang 1.18+
- docker
- VSCode (IDE i used for golang)
To install dependency tools:
make pre
docker-compose up -d
Check if it's running:
curl localhost:8080/ping
Most of the server codes are implemented by the demo template. There are only a few tasks left:
- Setup and configure a datastore (Redis)
- Edit docker-compose.yml to add a Redis server
- Setup Redis client in the rpc-server
- Implement handlers in rpc-server
areYouLucky() is a placeholder function. We need to replace it with our business logic here, i.e writing and reading messages from Redis
- Send
- Pull
- go.mod
- go.sum
- handler_test.go
- main.go
- models.go
- redis.go
- docker-compose.yml