A small Redis-like server written in Go. It speaks RESP, listens on port 6379, supports basic string and hash commands, and persists SET operations to database.aof.
-
Make sure port
6379is free. -
U can check from this command:
sudo systemctl status redis
-
If it's still running then turn it off:
sudo systemctl stop redis
-
Start the server:
go run main.go
-
Connect from another terminal:
redis-cli
PINGSET key valueGET keyHSET hash field valueHGET hash fieldHGETALL hash
PINGreturnsPONGwith no arguments, or echoes the provided argument.HGETALLreturns field-value pairs as a RESP array.SETis appended to the AOF file for persistence.
This project was built while following: https://www.build-redis-from-scratch.dev/en/implementing-commands