How to Connect to a Project with Node.js

Credit goes to Mr: Gary Mann of Neo4j
>> code from Gary >> ie: session object creation line can spicify the database , ie: session = driver.session({database:'DATABASE_2'})
const neo4j = require('neo4j-driver')
const uri= "neo4j://localhost:7687"
const user="neo4j"
const password="password"
const driver = neo4j.driver(uri, neo4j.auth.basic(user, password))

async function query() {
try {
session = driver.session({database:'DATABASE_2'})
const result = await session.run( 'MATCH (n) RETURN count(n) AS cnt', {});
const res = result.records[0].get(0)
console.log("Result:", res);
return res;
} catch (e) {
console.log(e);
} finally {
console.log("closing ...");
await session.close();
await driver.close();
}
}

query();