Optional
config: ConfigAn object with configuration options.
const db = arangojs({
url: "http://127.0.0.1:8529",
databaseName: "myDatabase",
auth: { username: "admin", password: "hunter2" },
});
Creates a new Database
instance with its own connection pool.
This is a wrapper function for the database.Database:constructor.
Base URL of the ArangoDB server or list of server URLs.
Equivalent to the url
option in connection.Config.
Optional
name: stringconst db = arangojs("http://127.0.0.1:8529", "myDatabase");
db.useBasicAuth("admin", "hunter2");
Creates a new
Database
instance with its own connection pool.This is a wrapper function for the database.Database:constructor.