I am new to Node JS world. I am using a Oracle DB in my application and creating a connection pool. Using this connection pool to query the DB. Application is working fine but For my testing, I need to log how many connections are open after every query.
How can I log how many connections are open.
Below is my code to create connection pool:
async function bbUserPool() {
try {
await oracledb.createPool({
user : config.user,
password : config.password,
connectString : config.connectString,
poolAlias : 'userpool',
poolIncrement : 10,
poolMax : 20,
poolMin : 20
});
}
catch (err) {
console.error("Connection Pool Error:" + err.message)
}
}
How can I log how many connections are open.