nodejs使用radis
来源:互联网 发布:mysql dump 导出表 编辑:程序博客网 时间:2024/06/07 23:16
npm install redis 安装nodejs redis 客户端
sudo apt-get install redis-server 安装redis-server
redis-server 这一步运行redis-server
代码:
var redis = require("redis"), client = redis.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", redis.print);client.hset("hash key", "hashtest 1", "some value", redis.print);client.hset(["hash key", "hashtest 2", "some other value"], redis.print);client.hkeys("hash key", function (err, replies) { console.log(replies.length + " replies:"); replies.forEach(function (reply, i) { console.log(" " + i + ": " + reply); }); client.quit();});默认port 6379
0 0
- nodejs使用radis
- radis客户端学习使用
- Radis 使用详细教程
- Radis
- radis
- radis在linux中使用实例。
- radis lua
- Radis HyperLogLog
- radis数据类型
- nodejs使用
- nodejs使用
- 【NodeJS】使用forever管理nodejs
- 【NodeJs】NodeJs中使用highstock
- Memcache 和 Radis 比较
- Memcache 和 Radis 比较
- radis入门简介
- memached与radis一点比较
- windows下 实现radis 集群
- 半数单集问题
- The 2015 ACM-ICPC Asia Beijing Regional Contest K A Math Problem
- undefined、null应用场合
- golang中net/http包用法
- 通信调试工具
- nodejs使用radis
- TCP/IP协议学习笔记
- Asteroids (最小覆盖)
- spring mvc aop 拦截 附近上传
- 等比例图片缩放
- Java finally语句到底是在return之前还是之后执行?
- centos7 配置多个Tomcat
- android自定义之 5.0 风格progressBar
- .net之gridview表中数据操作