I am new to Node js and Arango DB. I am trying to connect my node app to ArangoDB and there seems to be a connection issue which I cannot figure out.
Version - Node v20.9.0, arangojs/8.6.0, Arango DB 3.11
import { Database, aql } from "arangojs";
//establish connection to the database
const db = new Database({
url: "https://755024bd022c.arangodb.cloud:8529",
databaseName: "travel_Lf11ugoI",
auth: { username: "root", password: "xxxxxxxxxxxxx" },
});
//check if connection is established
const result = await db.exists();
if (result) {
console.log("Database exists");
} else {
console.log("Database does not exist");
}