Closed Gabxi closed 10 years ago
StackOverflow would be a better place to take this up ..
The issue is not with your query , its with the Database connectivity . Please make sure the neo4j server is running and you have initialized your graph object via the following code
var neo4j = require('neo4j');
var graph = new neo4j.GraphDatabase('http://localhost:7474');
I agree, it sounds like you're not passing a URL to the GraphDatabase
constructor, which you need to be doing. See for example this:
https://github.com/aseemk/node-neo4j-template/blob/master/models/user.js#L5-L9
So in my callback function, I did a console.log on the graph to make sure that it exists. However, when I run this code
I get this error TypeError: Cannot read property 'hostname' of undefined at Request.send (./node_modules/neo4j-js/lib/Neo4jApi.js:195:27) at new Request (./node_modules/neo4j-js/lib/Neo4jApi.js:188:9) at Graph.query (./node_modules/neo4j-js/lib/Graph.js:84:55)
Any help would be appreciated. I apologize if this the wrong place to post this.