Using Neo4j from JavaScript
This guide introduces the Neo4j JavaScript driver and links to the relevant resources.
You should be familiar with graph database concepts and the property graph model. You should have created an Neo4j AuraDB cloud instance, or installed Neo4j locally.
Neo4j for JavaScript developers
Neo4j provides libraries that allow you to connect to the database and develop applications which create, read, update, and delete information from the graph.
The Neo4j JavaScript driver connects to the database using the binary protocol Bolt. It aims to be minimal while being idiomatic to JavaScript, allowing you to subscribe to a stream of responses, errors, and completion events.
For detailed information on how to build applications with Neo4j and JavaScript, go to the Neo4j JavaScript Driver Manual. There you can find instructions and code examples for every workflow step.
Driver configuration
From Neo4j 4.0 and onwards, the default encryption setting is off by default and Neo4j will no longer generate self-signed certificates.
This applies to default installations, installations through Neo4j Desktop and Docker images.
You can verify the encryption level of your server by checking the dbms.connector.bolt.enabled
key in neo4j.conf
.
Certificate Type | Neo4j Cluster | Neo4j Standalone Server | Direct Connection to Cluster Member |
---|---|---|---|
Unencrypted |
|
|
|
Encrypted with Full Certificate |
|
|
|
Encrypted with Self-Signed Certificate |
|
|
|
|
N/A |
N/A |
Review your SSL Framework settings when going into production.
Name |
Version |
Authors |
neo4j-driver |
5.22.0 |
The Neo4j Team |
The example project
The Neo4j example project is a small, one page webapp for the movies database built into the Neo4j tutorial. The front-end page is the same for all drivers: movie search, movie details, and a graph visualization of actors and movies. Each backend implementation shows you how to connect to Neo4j from each of the different languages and drivers.
You can learn more about our small, consistent example project across many different language drivers here. You will find the implementations for all drivers as individual GitHub repositories, which you can clone and deploy directly.
Learn with GraphAcademy
Building Neo4j Applications with Node.js
In this free course, we walk through the steps to integrate Neo4j into your Node.js projects. You will learn about the Neo4j JavaScript driver, how sessions and transactions work and how to query Neo4j from an existing application.