-
-
Save stockholmux/7fcf8ef4ad253045280a0aee34318182 to your computer and use it in GitHub Desktop.
index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//with a previously create client | |
client.set('some-key','42',function(err) { | |
if (err) { | |
throw err; /* in production, handle errors more gracefully */ | |
} else { | |
client.get('some-key',function(err,value) { | |
if (err) { | |
throw err; | |
} else { | |
console.log(value); | |
} | |
} | |
); | |
}); |
I have forked this example to make it works (missing closing bracket)
https://gist.github.com/tgrall/ad2239ee53e0617004ddc6dc34f6636f#file-node_redis_commands-js-L14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: else part is not closed properly.
client.set('some-key','42',function(err) {
if (err) {
throw err; /* in production, handle errors more gracefully */
} else {
client.get('some-key',function(err,value) {
if (err) {
throw err;
} else {
console.log(value);
}
});
}
});