redis-pool-fns

1.3.2 • Public • Published

redis-pool-fns

redis-pool-fns

var config = {
	host: '127.0.0.1',
	port: 6379,
	max_clients: 30,
	perform_checks: false,
	perfix: "hello_",
	database: 0,
	options: {
		auth_pass: '033481033481'
	}
};

var redis = require("./redis")(config);

var key = "asd6";
var value = "hello world6";

redis.set(key, value, null, function (err) {
	if (err) {
		console.log(err);
		return;
	}
	redis.get(key, function (err, reply) {
		if (err) {
			console.log(err);
			return;
		}
		console.log(reply);
	});
});

redis.getPatt("asd*", function (err, reply) {
	if (err) {
		console.log(err);
		return;
	}
	console.log(reply);
});

redis.zAdd("zasd", "aac", "115", function (err, reply) {
	if (err) {
		console.log(err);
		return;
	}
});

redis.zRange("zasd", 0, -1, function (err, reply) {
	if (err) {
		console.log(err);
		return;
	}
	console.log(reply);
}, true);

Readme

Keywords

Package Sidebar

Install

npm i redis-pool-fns

Weekly Downloads

1

Version

1.3.2

License

ISC

Unpacked Size

9.63 kB

Total Files

5

Last publish

Collaborators

  • hewenhan