Thanks for the information, how can I fix this?
after i fix this i will use findOne
var mongoDB = require("../mongodb.js");
var warnDB = mongoDB.getConnection().db("admin").collection('coltest');
output:
var warnDB = mongoDB.getConnection().db("admin").collection('coltest');
^
TypeError: mongoDB.getConnection(...).db is not a function```