Mini Redis is a lightweight, educational implementation of a Redis-like key-value store in Node.js. It features a TCP server that understands the RESP (Redis Serialization Protocol) and a web-based dashboard for monitoring and interaction.
- TCP Server: Listens on port 6379 and handles standard Redis commands.
- RESP Protocol: Implements a custom parser for the Redis Serialization Protocol.
- Web Dashboard: Real-time monitoring of stats and an interactive console (Port 8080).
- In-Memory Store: Fast key-value storage.
- Clone the repository.
git clone <repository-url>
- Navigate to the project directory.
cd "Mini Redis"
- Install dependencies (None! It uses standard Node.js libraries).
Start the server:
node server.jsYou should see output similar to:
Mini Redis TCP server running on port 6379
Mini Redis Web Interface running at http://localhost:8080
Open your browser and navigate to http://localhost:8080 to view the dashboard.
You can connect using netcat or any Redis client:
nc localhost 6379SET key value: Store a value.GET key: Retrieve a value.DEL key: Delete a key.PING: Check server health.
server.js: Main entry point, sets up TCP and HTTP servers.parser.js: Handles parsing of RESP messages.commands.js: Command execution logic.store.js: In-memory data storage.public/: Static files for the web dashboard.
