Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (44 sloc) 1.82 KB

Neo4j driver (REST API client) for Node.js

This driver lets you access Neo4j, a graph database, from Node.js.

Important: This library currently only formally supports Neo4j 1.4. We are in the process of upgrading this library to support Neo4j 1.5 and now 1.6.


npm install neo4j


git clone
cd node-neo4j
npm link

You'll also need a local Neo4j database instance for the tests:

curl --O neo4j-community-1.4-unix.tar.gz
tar -zxvf neo4j-community-1.4-unix.tar.gz
mv neo4j-community-1.4 db

If you're new to Neo4j, read the Getting Started page. Start the server:

db/bin/neo4j start

Stop the server:

db/bin/neo4j stop

To run the tests:

npm test


var neo4j = require('neo4j');
var db = new neo4j.GraphDatabase('http://localhost:7474');

function print(err, res) {
    console.log(err || (res && res.self) || res);

// Create node
var node = db.createNode({hello: 'world'});;   // this will be async

// Get node
node = db.getNodeById(1, print);    // this will be async

// Get relationship
rel = db.getRelationshipById(1, print)  // this will be async


This library is licensed under the Apache License, Version 2.0.

Reporting Issues

If you encounter any bugs or other issues, please file them in the issue tracker.

Jump to Line
Something went wrong with that request. Please try again.