Creates a temporary neo4j db listening on http://localhost:port
It's here if you want to test nodejs neo4j integrations
This module includes binaries to start neo4j, you’ll only need Java installed on your computer.
Usually you already have Java installed, if not we recommend that you install OpenJDK 8 (preferred) or 7 or Oracle Java 8 (preferred) or 7
- 2.3.3
- 3.1.1 with new bolt connection
osx, linux
npm install --save-dev neodb
"use strict"
let NeoTestDB = require('neodb')
let testDB = new NeoTestDB(6363, '2.3.3') // port, version, boltPort
testDB.start()
.then(function (data) {
console.log('Started Neo4j Test DB', data)
setTimeout(function () {
testDB.stop()
.then(function (data) {
console.log('Stopped Neo4j Test DB', data)
})
.catch(function (e) {
console.error(e)
})
}, 2000)
})
.catch(function (e) {
console.error(e)
})
It always starts with an empty database.
when calling .start()
you will get an Promise object that when resolved will have the following keys
version
, running Neo4j version ex. 2.3.3port
, http port ex. 6363url
, http url ex. http://localhost:6363boltPort
, bolt port ex. 6364boltURL
, bolt url ex. bolt://127.0.0.1:6364
- Neo4j Home: http://neo4j.com/