Skip to content
On this page

.funcs.init

Used to initialize a database with a MongoDB connection URI and an array of collections (tables).

It creates a single Database instance.

WARNING

This should NEVER be used as Athena already sets up your Database and creates a connection to your Database if configured correctly. This is just for documentation purposes only.

Usage

Arguments

Returns

  • Promise of successful connection as a boolean.
typescript
Athena.database.funcs.init('mongodb://username:password@127.0.0.1:27017', ['data']);

Created by Stuyk | Est. 2020