Using express js with neo4j through the driver

i found a lot of tutorial online but i am still confused about several issues like:

  • when to session.run and when to use session.write transactions
  • how to export the object of session to be used in main and in the different routes

It would be good to see your code so that we can get an idea of what exactly you're doing. In case you haven't had a chance to check them out here are the docs https://github.com/neo4j/neo4j-javascript-driver#readme there are some really good examples there of various functions.