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://your-domain.provider.graphstory.com", neo4j.auth.basic("username", "password"));
var session = driver.session();
session
  .run( "CREATE (a:Person {name:'Arthur', title:'King'})" )
  .then( function()
  {
    return session.run( "MATCH (a:Person) WHERE a.name = 'Arthur' RETURN a.name AS name, a.title AS title" )
  })
  .then( function( result ) {
    console.log( result.records[0].get("title") + " " + result.records[0].get("name") );
    session.close();
    driver.close();
  });

More information on using Neo4j with JavaScript

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?