File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ To get the latest stable release omit `@next` part altogether or use `@latest` i
3131``` javascript
3232var neo4j = require (' neo4j-driver' ).v1 ;
3333```
34+ Driver instance should be closed when Node.js application exits:
35+
36+ ``` javascript
37+ driver .close ();
38+ ```
39+
40+ otherwise application shutdown might hang or it might exit with a non-zero exit code.
3441
3542## Include in web browser
3643
@@ -46,6 +53,14 @@ This will make a global `neo4j` object available, where you can access the `v1`
4653var driver = neo4j .driver (" bolt://localhost" , neo4j .auth .basic (" neo4j" , " neo4j" ));
4754```
4855
56+ It is not required to explicitly close the driver on a web page. Web browser should gracefully close all open
57+ WebSockets when the page is unloaded. However, driver instance should be explicitly closed when it's lifetime
58+ is not the same as the lifetime of the web page:
59+
60+ ``` javascript
61+ driver .close ();
62+ ```
63+
4964## Usage examples
5065
5166``` javascript
You can’t perform that action at this time.
0 commit comments