From 29f6bf210b35c461db00ada40b752ccccd22550c Mon Sep 17 00:00:00 2001 From: Nicolas Dextraze Date: Wed, 9 Mar 2016 17:08:03 -0800 Subject: [PATCH] Updated README.md with dependencies --- README.md | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e699b7e..e568f96 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,11 @@ # eventstore-node A port of the EventStore .Net ClientAPI to Node.js -## Porting .Net Task to Node.js +## Dependencies -I used Promise to replace .Net Task, so when executing an async command, i.e. appendToStream you'll have to wait for result/error like this: - - connection - .appendToStream('myStream', client.expectedVersion.any, events, userCredentials) - .then(function(result) { - //Do something with the WriteResult here - }) - .catch(function(err) { - //Handle error here - }); +- Node.js >= 0.12 +- protobufjs module +- uuid module ## Status @@ -28,16 +21,29 @@ Incomplete/missing features: - Tests: tests are only covering happy path scenarios for now - NPM package: no package released yet, I will release one when code is stable +## Porting .Net Task to Node.js + +I used Promise to replace .Net Task, so when executing an async command, i.e. appendToStream you'll have to wait for result/error like this: + + connection + .appendToStream('myStream', client.expectedVersion.any, events, userCredentials) + .then(function(result) { + //Do something with the WriteResult here + }) + .catch(function(err) { + //Handle error here + }); + ## Running the tests You will need: -- dependencies (npm install) -- nodeunit (npm install -g nodeunit) +- dependencies (`npm install`) +- nodeunit (`npm install -g nodeunit`) - an instance of EventStore running on localhost:1113 (https://geteventstore.com/downloads/) To execute the tests suites simply run test with npm -npm test + npm test ## License