This commit is contained in:
Robert on Asus 305 2016-10-29 16:41:08 -07:00
parent 69842b8d44
commit 4f066bf00e

View File

@ -60,24 +60,15 @@ esConnection.appendToStream(streamName, esClient.expectedVersion.any, event)
console.log(err); console.log(err);
}); });
``` ```
Create ```package.json```:
Run:
```json ```json
{ npm install uuid
"name": "hello", npm install eventstore-node
"version": "1.0.0", node app.js
"main": "app.js",
"dependencies": {
"eventstore-node": "latest",
"uuid": "latest"
}
}
``` ```
```npm install```
```node app.js```
## Porting .Net Task to Node.js ## Porting .Net Task to Node.js
.Net Task have been replace with Promise. When executing an async command, i.e. appendToStream you can use then/catch to wait for result/error. .Net Task have been replace with Promise. When executing an async command, i.e. appendToStream you can use then/catch to wait for result/error.