Skip to content

Commit 798ced7

Browse files
committed
Add driver.close() to the usage example
1 parent b6549b6 commit 798ced7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ driver.close();
6666
```javascript
6767

6868
// Create a driver instance, for the user neo4j with password neo4j.
69+
// It should be enough to have a single driver per database per application.
6970
var driver = neo4j.driver("bolt://localhost", neo4j.auth.basic("neo4j", "neo4j"));
7071

7172
// Register a callback to know if driver creation was successful:
@@ -148,6 +149,9 @@ if (success) {
148149
console.log('rolled back');
149150
tx.rollback();
150151
}
152+
153+
// Close the driver when application exits
154+
driver.close();
151155
```
152156

153157
Subscriber API allows following combinations of `onNext`, `onCompleted` and `onError` callback invocations:

0 commit comments

Comments
 (0)