node_re dis 介绍
Re dis 是 一个 基于内存的键(key)值(value)类型的数据结构存储容器,它既可以完全工作在内存中,也可以持久化存储。?
使用 Node.js 来进行开发,Re dis 推荐使用的 Node.js 驱动为 Node_Re dis 插件 。
node_re dis 安装
npm install re dis
?node_re dis 实例
var re dis = require("re dis "),
client = re dis .createClient();
// if you'd like to select database 3,instead of 0 (default),call
// client.select(3,function() { /* ... */ });
client.on("error",function (err) {
console.log("Error " + err);
});
client.set("string key","string val",re dis .print);
client.hset("hash key","hashtest 1","some value",re dis .print);
client.hset(["hash key","hashtest 2","some other value"],re dis .print);
client.hkeys("hash key",function (err,replies) {
console.log(replies.length + " replies:");
replies.forEach(function (reply,i) {
console.log(" " + i + ": " + reply);
});
client.quit();
});
网站地址 : http://redis.js.org/
GitHub: https://github.com/NodeRedis/node_redis
网站描述: node之中连接re dis 使用的re dis 模块
node_redis官方网站
官方网站: http://redis.js.org/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。