Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-13-2020 12:51 PM
Hello, i want to acces to the database but i got this error. Here is the code:
const neo4j = require("neo4j-driver").v1;
const driver = neo4j.driver(
"bolt://localhost:7687",
neo4j.auth.basic("neo4j", "1234")
);
const session = driver.session();
app.post("/registro", function(req, res) {
var nombre = req.body.nombre;
var apellidos= req.body.apellidos;
var email= req.body.email;
var pass= req.body.pass;
session.run("MATCH (user:Usuario {email:"+email+"}) RETURN user")
.then(results => {
if (!_.isEmpty(results.records)) {
console.log("error")
}
else {
console.log("bien")
}
})
.catch(error => {
session.close();
console.log(error);
driver.close()
})
});
and i got this error:
Neo4jError: Client network socket disconnected before secure TLS connection was established
at captureStacktrace (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\neo4j-driver\lib\v1\result.js:199:15)
at new Result (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\neo4j-driver\lib\v1\result.js:65:19)
at Session._run (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\neo4j-driver\lib\v1\session.js:154:14)
at Session.run (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\neo4j-driver\lib\v1\session.js:130:19)
at S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\app.js:28:13
at Layer.handle [as handle_request] (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\express\lib\router\layer.js:95:5)
at next (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\express\lib\router\layer.js:95:5)
at S:\sergi\Documents\INFORMATICA\4º Curso Informatica\1º Cuatrimestre\SIGBI\Practica\SIGBI\Backend\node_modules\express\lib\router\index.js:281:22 {
code: 'ServiceUnavailable',
name: 'Neo4jError'
}
how to solve this ?
All the sessions of the conference are now available online