You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
To build applications with Neo4j, you use official drivers that communicate with the database over the Bolt protocol. Neo4j provides drivers for all major programming languages.
Bolt is Neo4j's binary protocol, optimised for graph database communication:
| Feature | Description |
|---|---|
| Binary format | Efficient serialisation (faster than HTTP/JSON) |
| Connection pooling | Reuses connections for better performance |
| Encryption | TLS by default on AuraDB |
| Port | 7687 (default) |
| Language | Package |
|---|---|
| JavaScript / TypeScript | neo4j-driver |
| Python | neo4j |
| Java | org.neo4j.driver:neo4j-java-driver |
| .NET (C#) | Neo4j.Driver |
| Go | github.com/neo4j/neo4j-go-driver |
npm install neo4j-driver
const neo4j = require('neo4j-driver');
const driver = neo4j.driver(
'neo4j://localhost:7687',
neo4j.auth.basic('neo4j', 'your-password')
);
// Verify connectivity
await driver.verifyConnectivity();
console.log('Connected to Neo4j');
const session = driver.session();
try {
// Read query
const result = await session.executeRead(async (tx) => {
return tx.run(
'MATCH (p:Person {name: $name}) RETURN p',
{ name: 'Alice' }
);
});
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.