O'Reilly logo

Neo4j Cookbook by Ankur Goel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing Neo4j from Node.js

Node.js is getting increasingly popular with the entrant of JavaScript on the server side due to its asynchronous nature.

In this recipe, we will learn how to access the Neo4j graph database using Node.js.

Getting ready

Node-Neo4j is the most popular client when its comes to accessing the Neo4j graph database server from Node.js. For more information on this, you can refer to https://github.com/thingdom/node-neo4j.

The following steps will get you started with Node-Neo4j:

  1. Node-Neo4j can be installed by typing the following on the command line:
    npm install neo4j
    
  2. In the Node.js code, include the library, which has been installed, using the following line of code:
    var neo4j = require('neo4j');

How to do it…

The following steps ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required