Skip to content

Instantly share code, notes, and snippets.

@tgrall
Forked from stockholmux/node_redis_commands.js
Last active June 18, 2019 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgrall/ad2239ee53e0617004ddc6dc34f6636f to your computer and use it in GitHub Desktop.
Save tgrall/ad2239ee53e0617004ddc6dc34f6636f to your computer and use it in GitHub Desktop.
index.js
//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);
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment