Install dependencies
npm install
Start the server
npm start
You can talk to this redis server using official redis-cli.
In another terminal you can try the following:
$redis-cli -p 3000
127.0.0.1:3000> ping
PONG
127.0.0.1:3000> echo "hello world"
hello world
127.0.0.1:3000> set name ashwani
OK
127.0.0.1:3000> get name
ashwani
My server's performance
$ redis-benchmark -p 3000 -t set,get, -n 100000 -q
SET: 80128.20 requests per second
GET: 89847.26 requests per second
Redis docker server's performance
$ redis-benchmark -t set,get, -n 100000 -q
SET: 41858.52 requests per second
GET: 40209.09 requests per second
Note: My code has huge performance due to less complexity and overhead