Skip to content
Browse files

Updated the README

  • Loading branch information...
1 parent 5cea2da commit 9b9cfc4b715ad29b49bc5673bc37ddc78bbbb195 @bnoguchi bnoguchi committed Apr 25, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 README.md
View
13 README.md
@@ -12,18 +12,23 @@ Via git:
node-waf configure build
### Example
- var sys = require("sys"),
- HashRing = require("./lib/hash_ring");
+ var HashRing = require("./lib/hash_ring");
// Create a cluster of 3 servers weighted so that 127.0.0.2:8080 stores twice as many
// keys as 127.0.0.1:8080, and 127.0.0.3:8080 stores 4x as many keys as 127.0.0.1:8080
// and 2x as many keys as 127.0.0.2:8080
var ring = new HashRing({"127.0.0.1:8080": 1, "127.0.0.2:8080": 2, "127.0.0.3:8080":4});
- sys.log(ring.getNode("users:102") ); // Should be 127.0.0.3:8080
+ console.log(ring.getNode("users:102") ); // Should be 127.0.0.3:8080
-See [./test/test_distribution.js](http://github.com/bnoguchi/node-hash-ring/test/test_distribution.js) for another example:
+See [./test/test_distribution.js](https://github.com/bnoguchi/node-hash-ring/test/test_distribution.js) for another example:
node test/test_distribution.js
+### Tests
+
+To run the tests:
+
+ $ make test
+
### License
MIT License

0 comments on commit 9b9cfc4

Please sign in to comment.
Something went wrong with that request. Please try again.