Robert Schäfer 15d9178369 Install and configure eslint
Fix all violations but one - there is a mock in our authentication.
2018-12-03 18:05:28 +01:00

21 lines
414 B
JavaScript

import { v1 as neo4j } from 'neo4j-driver'
let driver
export default function () {
return {
getDriver () {
if (!driver) {
driver = neo4j.driver(
process.env.NEO4J_URI || 'bolt://localhost:7687',
neo4j.auth.basic(
process.env.NEO4J_USER || 'neo4j',
process.env.NEO4J_PASSWORD || 'neo4j'
)
)
}
return driver
}
}
}