node.js redis

Posted durcaidurcai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了node.js redis相关的知识,希望对你有一定的参考价值。

//需要安装redis模块
npm install redis

var redis = require("redis");
var client = redis.createClient(6379,‘127.0.0.1‘);

/*
client.get("Roban",function(err,response){
console.log(err,response); //will print lee
});*/

client.rpush("liebiao1","1",function(err,response){

});













以上是关于node.js redis的主要内容,如果未能解决你的问题,请参考以下文章

Node.js 模块

[Node.js]如何在IDEA中配置Node.js

node.js 初识node.js,运行在服务端的 JavaScript

node.js教程基础:node.js命令行选项

Node.js HTTP模块

Node.js基础:第一篇