Permalink
Browse files

Fix readme markdown

  • Loading branch information...
1 parent 1e4dc3e commit c117dab1000a0a35418690ce983485878dd69316 vvo committed Jul 26, 2012
Showing with 39 additions and 35 deletions.
  1. +39 −35 README.md
View
@@ -7,50 +7,54 @@
# Installation
- npm install zkplus
+``` bash
+npm install zkplus
+```
# Usage
- var assert = require('assert');
- var zkplus = require('zkplus');
-
- var client = zkplus.createClient({
- servers: [{
- host: 'localhost'
- , port: 2181
- }]
- });
-
- client.on('connect', function () {
- client.mkdirp('/foo/bar', function (err) {
- assert.ifError(err);
- client.rmr('/foo', function (err) {
- assert.ifError(err);
- client.close();
- });
- });
- });
+```js
+var assert = require('assert');
+var zkplus = require('zkplus');
+
+var client = zkplus.createClient({
+ servers: [{
+ host: 'localhost'
+ , port: 2181
+ }]
+});
+
+client.on('connect', function () {
+ client.mkdirp('/foo/bar', function (err) {
+ assert.ifError(err);
+ client.rmr('/foo', function (err) {
+ assert.ifError(err);
+ client.close();
+ });
+ });
+});
+```
# Tests
- To launch tests you'll need a running zookeeper instance.
- You can have one locally like this:
+To launch tests you'll need a running zookeeper instance.
+You can have one locally like this:
- ```bash
- cd
- wget http://mirror.speednetwork.de/apache/zookeeper/stable/zookeeper-3.3.5.tar.gz
- tar -xzvf zookeeper-3.3.5.tar.gz
- cd zookeeper-3.3.5
- cp conf/zoo_sample.cfg conf/zoo.cfg
- sudo ./bin/zkServer.sh start|stop|status
- ```
+```bash
+cd
+wget http://mirror.speednetwork.de/apache/zookeeper/stable/zookeeper-3.3.5.tar.gz
+tar -xzvf zookeeper-3.3.5.tar.gz
+cd zookeeper-3.3.5
+cp conf/zoo_sample.cfg conf/zoo.cfg
+sudo ./bin/zkServer.sh start|stop|status
+```
- Then to launch tests:
+Then to launch tests:
- ```bash
- cd node-zkplus
- npm test
- ```
+```bash
+cd node-zkplus
+npm test
+```
## License

0 comments on commit c117dab

Please sign in to comment.