couldn't use mongo db drivers
Hi,
I downloaded both async and sync drivers from here https://mongodb.github.io/mongo-java-driver/3.12/driver-async/getting-started/installation/
I import my drivers in classpath(current project), I set java VM.
I use this code, but I couldn't see any obyect.
async function main() {
var MongoClient = require('mongodb')
var client = await MongoClient.connect('mongodb://string<1>:<string2>:10255/?ssl=true&appName=@user@')
var db = client.db('dlc-dev-cosmos')
var collection = db.collection('batteries')
var docs = await collection.find({}).limit(5).toArray()
//console.log(docs)
Log.Message(docs)
await client.close()
}
main();
Could help me
MongoDB is a father root that contains all the libraries, in the javascript files, there is this call Require(.\<folder1>\<folder2>\xxx.js), and as I can see this not work importing in my project.
I schift to another solution... java libraries, so I imported them in java bridge panel and use them.