Reputation: 11
I have a Neo4j database that I'm trying to render in my webpage, but I need to select the database to be used, which is different from the URL.
I have a simple tag <div id="viz"></div>
with the following JavaScript:
let config = {
containerId: "viz",
neo4j: {
serverUrl: "neo4j://localhost:7687",
serverUser: "neo4j",
serverPassword: "*****",
},
initialCypher: "MATCH (n) RETURN n"
}
this.neo4j = new Neovis(config);
this.neo4j.render();
I tried adding database
to the neo4j
section and adding the name of the database in the serverUrl
.
Upvotes: 0
Views: 53
Reputation: 11
I figured it out. For anyone who may refer to this in the future, the property serverDatabase
needs to be added outside of the neo4j
section like so:
let config = {
containerId: "viz",
neo4j: {
serverUrl: "neo4j://localhost:7687",
serverUser: "neo4j",
serverPassword: "*****",
},
serverDatabase: "dbname",
initialCypher: "MATCH (n) RETURN n"
}
Upvotes: 1