https://github.com/cooco119/codecrafters-redis-go
https://github.com/cooco119/codecrafters-redis-go
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cooco119/codecrafters-redis-go
- Owner: cooco119
- Created: 2021-01-22T19:57:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-22T19:57:54.000Z (over 5 years ago)
- Last Synced: 2023-03-08T09:01:26.993Z (over 3 years ago)
- Language: Go
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a starting point for Go solutions to the
["Build Your Own Redis" Challenge](https://codecrafters.io/challenges/redis).
In this challenge, you'll build a toy Redis clone that's capable of handling
basic commands like `PING`, `SET` and `GET`. Along the way we'll learn about
event loops, the Redis protocol and more.
**Note**: If you're viewing this repo on GitHub, head over to
[codecrafters.io](https://codecrafters.io) to signup for early access.
# Usage
1. Ensure you have `go (1.13)` installed locally
1. Run `./spawn_redis_server.sh` to run your Redis server, which is implemented
in `app/server.go`.
1. Commit your changes and run `git push origin master` to submit your solution
to CodeCrafters. Test output will be streamed to your terminal.
# Passing the first stage
CodeCrafters runs tests when you do a `git push`. Make an empty commit and push
your solution to see the first stage fail.
```sh
git commit --allow-empty -m "Running tests"
git push origin master
```
You should see a failure message that says it wasn't able to connect to port
`6379`.
Go to `app/server.go` and uncomment the server implementation. Commit and push
your changes, and you'll now see the first stage pass.
Time to move on to the next stage!