cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Connection issue by using neo4j aura instance language is node.js

hi,
currently we are running Neo4j graph db in AWS EC2 instance and we are connecting database by using neo4j npm (This is a Node.js driver for Neo4j via it's REST API.)
but now we are willing to use neo4j aura instance in same connection but we are getting error. please help us...

var neo4j = require('neo4j');
var db = new neo4j.GraphDatabase('http://neo4j:password@neo4j+s://******.databases.neo4j.io:7687');

db.cypher({
query: 'MATCH (u:User {email: {email}}) RETURN u',
params: {
email: 'alice@example.com',
},
}, function (err, results) {
if (err) throw err;
var result = results[0];
if (!result) {
console.log('No user found.');
} else {
var user = result['u'];
console.log(JSON.stringify(user, null, 4));
}
});

error message:
if (err) throw err;
^

Error: getaddrinfo ENOTFOUND neo4j+s
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:72:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'neo4j+s'
}

1 REPLY 1

Aura doesn't support the http-API (yet) and the node-neo4j driver has been discontinued for many years.

Please use the official javascript driver:

https://neo4j.com/docs/javascript-manual/current/