new DatabaseServer(setup)
Creates an instance of DatabaseServer.
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setup |
Object | The configuration setup for the database server. Properties
|
Members
DBServer :mongoose.Connection
The MongoDB server instance.
Type:
- mongoose.Connection
HOST :string
The host URL for the MongoDB server.
Type:
- string
collections :Array
An array containing the initialized collections.
Type:
- Array
dbName :string
The name of the database.
Type:
- string
Methods
init(callbacks) → {DatabaseServer}
Initializes the database connection and sets up the collections.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
callbacks |
Object | Success and error callbacks for database initialization. Properties
|
Returns:
The DatabaseServer instance.
- Type
- DatabaseServer