Skip to content

Commit 71179de

Browse files
committed
fixed PR comments
1 parent 1d1a496 commit 71179de

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

examples/ConnectionConfigurationExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CONFIG SET requirepass "1234"
66
*/
77

88
const RedisGraph = require("redisgraph.js").Graph;
9-
let graph = new RedisGraph("social", {port:8080, options:{password:1234}});
9+
let graph = new RedisGraph("social", "127.0.0.1", 8080, {password:1234});
1010

1111
try {
1212
(async () => {

examples/ConnectionFromNodeRedisExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let options = {
1313
password:1234
1414
};
1515
let rc = redis.createClient(options)
16-
let graph = new RedisGraph("social", {host:rc});
16+
let graph = new RedisGraph("social", rc);
1717

1818
try {
1919
(async () => {

src/graph.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ class Graph {
1212
* See: node_redis for more options on createClient
1313
*
1414
* @param {string} graphId the graph id
15-
* @param {object} [configuration] - a map of:
16-
* @param {string | RedisClient} [configuration.host] Redis host or node_redis client
17-
* @param {string | int} [configuration.port] Redis port
18-
* @param {ClientOpts} [configuration.options] node_redis options
15+
* @param {string | RedisClient} [host] Redis host or node_redis client
16+
* @param {string | int} [port] Redis port
17+
* @param {ClientOpts} [options] node_redis options
1918
*/
20-
constructor(graphId, {host, port, options} ={}) {
21-
console.log("host = " + host + " port = " + port + " options = "+ options);
19+
constructor(graphId, host, port, options) {
2220
this._graphId = graphId; // Graph ID
2321
this._labels = []; // List of node labels.
2422
this._relationshipTypes = []; // List of relation types.

0 commit comments

Comments
 (0)