Neo4j Javascript application with sigma.js and bolt

123 Views Asked by At

I have helped to create a web app that uses sigma.js to display a graphical output, on top of a neo4j database.

I am trying to use the neo4j-driver with this to enable me to set this web app up on a remote server, with its own version of neo4j community edition constantly running.

The issue at the moment is that whenever you run the web app through remote connection to the server, it only links to neo4j if you are running the on your local machine.

I was told to download the above driver and use bolt protocol to fix this however I cannot get this to work.

I am not the most experience coder however I have tried using require('neo4j-driver') to no avail and I have also tried just linking it to 'bolt://localhost:7867.

Any pointers will be greatly appreciated.

var url_ = 'bolt://localhost:7687' 
var pword = 'neo4j2' 
sigma.neo4j.getLabels(
        { url: url_, user: 'neo4j', password: pword },
        function (labels) {
            console.log(labels)
            NodeLabels = labels;
            console.log("NodeLabels: " + NodeLabels);
        }
); 

Thank you!

1

There are 1 best solutions below

9
On

Chances are you have not enabled remote connections on the Neo4j server. Depending upon what connector you want to change, you will have to uncomment, change that configuration. Refer to official neo4j connector config: Connector Config

Example config change:

# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=0.0.0.0:7687

# HTTP Connector. There must be exactly one HTTP connector.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=0.0.0.0:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=0.0.0.0:7473