I connect to neo4j in Nodejs to get the ServiceConsumer node attribute. But not sure how to do it. here is my code that connects to neo4j. Suppose ServiceConsumer has attributes like city , state , name , userId , and I need to get the name ServiceConsumer. I get userId from the front end and based on this userId the neo4j database query to get node information. How to get the name ServiceConsumer? Any help would be appreciated.
var user = this.userId; var request = require("request"); var host = 'localhost'; port = 7474; var httpurlforconnection ='http://' + host + ':' + port + '/db/data/transaction/commit'; function runCypherQuery(query, user, callback) { request.post({ uri: httpUrlForTransaction, json: {statements: [{statement: query, parameters: user}]} }, function (err, res, body) { callback(err, body); }) }
source share