The official JavaScript driver is neo4j-driver. You can install it with npm:

npm install neo4j-driver@1.0.2

Now you can use it to connect to your Graph Story instance:

var neo4j = require('neo4j-driver').v1;

var driver = neo4j.driver("bolt://", neo4j.auth.basic("username", "password"));
var session = driver.session();
  .run( "CREATE (a:Person {name:'Arthur', title:'King'})" )
  .then( function()
    return "MATCH (a:Person) WHERE = 'Arthur' RETURN AS name, a.title AS title" )
  .then( function( result ) {
    console.log( result.records[0].get("title") + " " + result.records[0].get("name") );

More information on using Neo4j with JavaScript


You can use the official Neo4j JS driver in the browser as well, but your instance credentials would be available in the source code, so we do not recommend this. See the GitHub project for more information.

Did this answer your question?