Redis in Action (NodeJS Example code for the book)
yarn install
npm test
if you want to test one file, for example:
npm test .\test\ch04.test.js
- ch**/main.js is source code in NodeJS
- ch**/index.js just used for debug
- *.test.js is test code
- Windows 10 and node v8.11.3
We use sleep in test code, In my opinion, don't use sleep func in our service code, it's will block our service response. We use sleep just for test.
Now I'm using ioredis, you can see the transaction and pipeline.