npm install neo4j-driver
yarn add neo4j-driver
Follow the steps below to run the example code:
Copy and paste the code above into a file named
Enter the information for the AuraDB instance you want to connect to by replacing:
<Bolt url for Neo4j Aura instance>with the URI.
<Username for Neo4j Aura instance>with the username.
<Password for Neo4j Aura instance>with the password.
Use the following command to run the example code:
The example imports
neo4j-driver to connect to the Neo4j AuraDB instance.
Two functions are then called:
Personnodes and a
KNOWSrelationship between them using a write transaction.
Personnodes using a read transaction.
Developing with Neo4j Aura requires the use of Transaction Functions. Transaction Functions enable automatic recovery from transient network errors and enable load balancing.
Make sure to log queries and data sent from your application as it is useful when you encounter errors and can help with debugging.
Was this page helpful?