Added functionality for neo4js database

This commit is contained in:
Sven laptop
2026-07-23 18:44:50 +02:00
parent 9749eb6dc4
commit d84b917f27
9 changed files with 247 additions and 6 deletions
+18
View File
@@ -0,0 +1,18 @@
const neo4j = require('neo4j-driver');
const URI = process.env.GRAPH_DB_URI;
const USER = process.env.GRAPH_DB_USER;
const PASSWORD = process.env.GRAPH_DB_PWD;
const driver = neo4j.driver(URI, neo4j.auth.basic(USER, PASSWORD));
(async () => {
try {
const serverInfo = await driver.getServerInfo();
console.log('Neo4j Connection established');
} catch (error) {
console.error('Neo4j Connection failed', error);
}
})();
module.exports = driver;