@@ -4,7 +4,7 @@ An alpha-level database driver for a new Neo4j remoting protocol.
4
4
5
5
Note: This is in active development, the API is not stable. Please try it out and give us feedback, but expect things to break in the medium term!
6
6
7
- ## Add module to Node.js application
7
+ ## Include module in Node.js application
8
8
9
9
``` javascript
10
10
var neo4j = require (' build/node/neo4j' );
@@ -44,8 +44,7 @@ session.run(statement.join(' '), params).subscribe({
44
44
onNext : function (record ) {
45
45
// On receipt of RECORD
46
46
for (var i in record) {
47
- console .log (i);
48
- console .log (record[i]);
47
+ console .log (i, ' : ' , record[i]);
49
48
}
50
49
}, onCompleted : function (metadata ) {
51
50
console .log (metadata);
@@ -55,13 +54,12 @@ session.run(statement.join(' '), params).subscribe({
55
54
});
56
55
57
56
// or
58
- // the collect way, with Javascript promises :
57
+ // the Promise way, where the complete response is collected :
59
58
session .run (statement .join (' ' ), params)
60
59
.then (function (records ){
61
60
records .forEach (function (record ) {
62
61
for (var i in record) {
63
- console .log (i);
64
- console .log (record[i]);
62
+ console .log (i, ' : ' , record[i]);
65
63
}
66
64
})
67
65
})
@@ -73,14 +71,14 @@ session.run(statement.join(' '), params)
73
71
## Building
74
72
75
73
npm install
76
- gulp
74
+ npm build
77
75
78
- This produces browser-compatible standalone files under ` build/browser ` and a nodejs module version under ` build/node ` .
76
+ This produces browser-compatible standalone files under ` build/browser ` and a Node.js module version under ` build/node ` .
79
77
See files under ` examples/ ` on how to use.
80
78
81
79
## Testing
82
80
83
81
./runTests.sh
84
82
85
83
This runs the test suite against a fresh download of Neo4j.
86
- Or ` gulp test` if you already have a running version of a compatible Neo4j server.
84
+ Or ` npm test` if you already have a running version of a compatible Neo4j server.
0 commit comments