Permalink
Browse files

Too early.

  • Loading branch information...
0 parents commit d0ada0b5bbe05f93b472fc6a5872495405743206 @athoune committed Jan 5, 2012
Showing with 68 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +17 −0 README.md
  3. +28 −0 lib/redisd.js
  4. +22 −0 package.json
@@ -0,0 +1 @@
+node_modules
@@ -0,0 +1,17 @@
+Node Redis protocol
+===================
+
+Implement your own server using the redis protocol.
+
+Build a fake redis or a redis slave.
+
+Status
+------
+
+Too early to be usable.
+
+
+Licence
+-------
+
+MIT
@@ -0,0 +1,28 @@
+
+var parsers = [];
+
+// hiredis might not be installed
+try {
+ require('../node_modules/redis/lib/parser/hiredis');
+ parsers.push(require('../node_modules/redis/lib/parser/hiredis'));
+} catch (err) {
+ if (exports.debug_mode) {
+ console.warn('hiredis parser not installed.');
+ }
+}
+
+parsers.push(require('../node_modules/redis/lib/parser/javascript'));
+
+var parser = new parsers[0].Parser();
+
+parser.on('error', function(err) {
+ console.log(err);
+});
+
+parser.on('reply', function(reply) {
+ console.log('reply', reply);
+});
+
+
+parser.execute(
+ new Buffer('*3\r\n$3\r\nSET\r\n$5\r\nmykey\r\n$7\r\nmyvalue\r\n'));
@@ -0,0 +1,22 @@
+{
+ "name" : "redis-protocol",
+ "version" : "0.0.1",
+ "description" : "implement your server with the redis protocol",
+ "author" : "Mathieu Lecarme <mathieu@garambrogne.net>",
+ "dependencies": {
+ "redis": ">=0.7"
+ },
+ "devDependencies": {
+ },
+ "keywords" : ["redis"],
+ "repositories": [{
+ "type": "git",
+ "path": "git://github.com/athoune/node-redis-protocol.git"
+ }],
+ "homepage" : "http://github.com/athoune/node-redis-protocol",
+ "bugs" : "http://github.com/athoune/node-redis-protocol/issues",
+ "licenses" : [{ "type": "MIT"}],
+ "engine" : "node",
+ "scripts" : {
+ }
+}

0 comments on commit d0ada0b

Please sign in to comment.