You need to use callbacks/promises and only close session when you're dong processing and driver when your app is shutting down.
see https://www.adamcowley.co.uk/javascript/using-the-neo4j-driver-with-nodejs/ On Tue, Feb 12, 2019 at 11:46 AM 'Marc Donovan' via Neo4j < neo4j@googlegroups.com> wrote: > const neo4j = require('neo4j-driver').v1; > const driver = neo4j.driver('bolt://localhost:7687', > neo4j.auth.basic('neo4j', 'neo4j')); > const session = driver.session(); > session.run('create (test:Airport)'); > session.close > driver.close > > It hangs at session.run. Anyone know what I am doing wrong? > > If I run it in the browser it runs in 1 ms and displays the next prompt. > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.