A modern, educational, and community-friendly Redis clone built in JavaScript for the Codecrafters Redis Challenge. This project demonstrates how to implement a TCP server that speaks the Redis protocol, supporting commands like PING
, SET
, and GET
.
- Educational: Learn about TCP servers, event loops, and the Redis protocol.
- Extensible: Easily add new Redis commands and features.
- Tested: Modern test suite using Jest.
- Documented: Clear documentation and contribution guidelines.
- Community-Ready: Welcoming to contributors of all experience levels.
- Install Node.js (v21 or higher):
node --version # Download: https://nodejs.org/en/download/current
- Install dependencies:
npm install
- Run the server:
npm start # For auto-reload during development: npm run dev
- Run tests:
npm test
- The server listens on port 6379 by default (like real Redis).
- Connect using any Redis client or
netcat
:nc localhost 6379 PING # Should respond with: +PONG
- Edit
app/main.js
to add or modify command handling.
Path | Description |
---|---|
app/ |
Main application code (entry: main.js ) |
test/ |
Jest test cases and utilities |
docs/ |
Architecture, observability, contributors |
README.md |
Project overview and setup |
CONTRIBUTING.md |
How to contribute |
CODE_OF_CONDUCT.md |
Community standards |
LICENSE |
Open source license (MIT) |
- All features and bug fixes should include tests in
test/
. - Run tests with:
npm test
- See
test/README.md
for details.
- See
docs/
for:
We welcome all contributions! Please read CONTRIBUTING.md
for guidelines on:
- Filing issues
- Submitting pull requests
- Code style and testing
All participants are expected to follow our CODE_OF_CONDUCT.md
.
This project is licensed under the MIT License.
Inspired by the Codecrafters Redis Challenge.