A TCP server written in Node.js that supports a subset of the Redis Protocol. Compliant with the redis-cli
.
Developed on Node 4.1.1, but should be compliant with less recent versions.
cd
into the project directory- Install dependencies:
npm install
- Run the server:
node server.js <port>
(default is 6379) - Run Redis client:
redis-cli -p <port>
(default is 6379) - Start sending commands to the server using the Redis client
GET key
SET key value
EXISTS key
DELETE key [key...]
INCR key
(atomicity at concurrent access is not guaranteed)DECR key
(atomicity at concurrent access is not guaranteed)
- Install
mocha
:npm install -g mocha
- Run the tests (while inside the project directory):
mocha
- Persist data between server restarts/crashes.
- Efficient (and more elegant) parsing of command inputs
- Support More operations
- Write more tests
- Atomic operations