Skip to content

Commit

Permalink
Fixing README code example syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
dvonlehman committed Mar 11, 2015
1 parent 6f0f230 commit fcd7786
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -49,8 +49,9 @@ app.get('/cache/:key', function(req, res, next) {
redis.exists(req.params.key, function(err, exists) {
if (err) return next(err);

if (exists === 1)
return redis.readStream(req.params.key).pipe(res);
if (exists)
return redis.readStream(req.params.key).pipe(res);

// Cache the remote http call for 60 seconds
request.get('http://somewhere.com/' + req.params.key)
.pipe(redis.writeThrough(req.params.key, 60))
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "redis-streams",
"version": "1.0.4",
"version": "1.0.5",
"description": "Extends the node redis client with readStream and writeThrough functions.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit fcd7786

Please sign in to comment.