A simple key-value store with distributed locking for multi-server environments.
- ✅ RESTful HTTP API
- ✅ Distributed Locking (Redis)
- ✅ In-Memory or Redis Storage
- ✅ Clean Architecture
- ✅ Comprehensive Tests
# Start with Redis (distributed)
make run
# Or in-memory (single server)
make run-memoryServer starts on http://localhost:8080
curl -X POST http://localhost:8080/api/keys \
-H "Content-Type: application/json" \
-d '{"key": "user:1", "value": {"name": "Alice"}}'curl http://localhost:8080/api/keys/user:1curl -X DELETE http://localhost:8080/api/keys/user:1curl http://localhost:8080/health| Variable | Default | Description |
|---|---|---|
STORAGE_TYPE |
redis |
Storage backend: memory or redis |
SERVER_PORT |
8080 |
HTTP server port |
REDIS_ADDR |
localhost:6379 |
Redis address |
REDIS_PASSWORD |
- | Redis password |
REDIS_DB |
0 |
Redis database |