1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Initial checkin. Many things work.

This commit is contained in:
Matt Ranney
2010-09-13 19:03:42 -07:00
commit e5a3dae882
2 changed files with 399 additions and 0 deletions

33
test.js Normal file
View File

@@ -0,0 +1,33 @@
var redis = require("./redis"),
client = redis.createClient(),
inspector = require("eyes").inspector();
function print_response(err, results) {
if (err) {
console.log("response sent back an error: " + err.stack);
return;
}
console.log("response: " + (typeof results) + ": " + results);
}
client.on("connect", function () {
console.log("Tester got connection");
try {
// client.INFO([], print_response);
// client.SET(["now", Date.now()], print_response);
// client.GET(["now"], print_response);
// client.GET(["some bullshit"], print_response);
// client.TYPE(["now"], print_response);
// client.EXISTS(["now"], print_response);
// client.EXISTS(["some bullshit"], print_response);
// client.DEL(["now"], print_response);
// client.MSET(["key1", "value1", "key2", "value2", "key3", "value3", "key4", "value4"], print_response);
client.MGET(["key1", "key2", "key3", "key4", "key5"], print_response);
} catch (err) {
console.log("Tester caught exception: " + err.stack);
}
});
process.on('uncaughtException', function (err) {
console.log("Uncaught exception: " + err);
});