@@ -4,13 +4,13 @@ This is the official Neo4j driver for JavaScript.
4
4
5
5
Resources to get you started:
6
6
7
- - Detailed docs _ Not available yet _
7
+ - [ API Documentation ] ( https://neo4j.com/ docs/api/javascript-driver/4.1/ )
8
8
- [ Neo4j Manual] ( https://neo4j.com/docs/ )
9
9
- [ Neo4j Refcard] ( https://neo4j.com/docs/cypher-refcard/current/ )
10
10
11
11
## What's New in 4.1
12
12
13
- - TODO
13
+ - [ Changelog ] ( https://github.com/neo4j/neo4j-javascript-driver/wiki/4.1-changelog )
14
14
15
15
## Including the Driver
16
16
@@ -63,12 +63,12 @@ It can be included in an HTML page using one of the following tags:
63
63
<
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /lib/browser/neo4j-web.min.js" ></
script >
64
64
```
65
65
66
- This will make a global ` neo4j ` object available, where you can access the driver API at ` neo4j ` \* :
66
+ This will make a global ` neo4j ` object available, where you can create a driver instance with ` neo4j.driver ` :
67
67
68
68
``` javascript
69
69
var driver = neo4j .driver (
70
70
' neo4j://localhost' ,
71
- neo4j .auth .basic (' neo4j' , ' neo4j ' )
71
+ neo4j .auth .basic (' neo4j' , ' password ' )
72
72
)
73
73
```
74
74
@@ -85,11 +85,11 @@ driver.close() // returns a Promise
85
85
### Constructing a Driver
86
86
87
87
``` javascript
88
- // Create a driver instance, for the user neo4j with password neo4j .
88
+ // Create a driver instance, for the user ` neo4j` with password `password` .
89
89
// It should be enough to have a single driver per database per application.
90
90
var driver = neo4j .driver (
91
91
' neo4j://localhost' ,
92
- neo4j .auth .basic (' neo4j' , ' neo4j ' )
92
+ neo4j .auth .basic (' neo4j' , ' password ' )
93
93
)
94
94
95
95
// Close the driver when application exits.
@@ -238,7 +238,7 @@ rxSession
238
238
// retries on network fluctuations and transient errors. Maximum retry time is
239
239
// configured on the driver level and is 30 seconds by default:
240
240
// Applies both to standard and reactive sessions.
241
- neo4j .driver (' neo4j://localhost' , neo4j .auth .basic (' neo4j' , ' neo4j ' ), {
241
+ neo4j .driver (' neo4j://localhost' , neo4j .auth .basic (' neo4j' , ' password ' ), {
242
242
maxTransactionRetryTime: 30000
243
243
})
244
244
```
@@ -472,15 +472,17 @@ To enable potentially lossy integer values use the driver's configuration object
472
472
``` javascript
473
473
var driver = neo4j .driver (
474
474
' neo4j://localhost' ,
475
- neo4j .auth .basic (' neo4j' , ' neo4j ' ),
475
+ neo4j .auth .basic (' neo4j' , ' password ' ),
476
476
{ disableLosslessIntegers: true }
477
477
)
478
478
```
479
479
480
480
## Building
481
481
482
- npm install
483
- npm run build
482
+ ```
483
+ npm install
484
+ npm run build
485
+ ```
484
486
485
487
This produces browser-compatible standalone files under ` lib/browser ` and a Node.js module version under ` lib/ ` .
486
488
See files under ` examples/ ` on how to use.
@@ -491,26 +493,36 @@ Tests **require** latest [Boltkit](https://github.com/neo4j-contrib/boltkit) and
491
493
492
494
Boltkit is needed to start, stop and configure local test database. Boltkit can be installed with the following command:
493
495
494
- pip3 install --upgrade boltkit
496
+ ```
497
+ pip3 install --upgrade boltkit
498
+ ```
495
499
496
500
To run tests against "default" Neo4j version:
497
501
498
- ./runTests.sh
502
+ ```
503
+ ./runTests.sh
504
+ ```
499
505
500
506
To run tests against specified Neo4j version:
501
507
502
- ./runTests.sh '-e 4.1.0'
508
+ ```
509
+ ./runTests.sh '-e 4.1.0'
510
+ ```
503
511
504
512
Simple ` npm test ` can also be used if you already have a running version of a compatible Neo4j server.
505
513
506
514
For development, you can have the build tool rerun the tests each time you change
507
515
the source code:
508
516
509
- gulp watch-n-test
517
+ ```
518
+ gulp watch-n-test
519
+ ```
510
520
511
521
If the ` gulp ` command line tool is not available, you might need to install this globally:
512
522
513
- npm install -g gulp-cli
523
+ ```
524
+ npm install -g gulp-cli
525
+ ```
514
526
515
527
### Testing on windows
516
528
0 commit comments