hiredis0.5.0 • Public • Published
Install with NPM:
npm install hiredis
g++4.8 or newer.
python2.7 or any newer 2.x version.
python3.x is not supported.
For running on Travis check the bundled .travis.yml.
To work on the code, first fetch the bundled hiredis submodule, then build hiredis and run the tests.
git submodule update --init npm install npm test
hiredis-node works out of the box with Matt Ranney's node_redis. The latter has an optional dependency on hiredis-node, so maybe you're already using it without knowing.
Alternatively, you can use it directly:
var hiredis =reader = ;// Data comes inreader;// Reply comes outreader // => "hello"
Instead of returning strings for bulk payloads, it can also return buffers:
var hiredis =reader = return_buffers: true ;// Data comes inreader;// Reply comes outreader // => <Buffer 68 65 6c 6c 6f>
Since Version 0.3.0 hiredis-node officially supports Windows.
npm install hiredis should just work.
If not, please open a bug report.
There's also a Windows fork by Dmitry Gorbunos (@fuwaneko), which should now be unnecessary.
This code is released under the BSD license, after the license of hiredis.