Expand description

This module contains functions and structures related to handling the MongoDB database, specially regarding connections, database and collection creation and management.

Statics

Default user session duration for the session collection, in seconds. Calculates to one week by default. Minimum value is one minute, as per limitations of MongoDB related to expiration checks.

Functions

Generates a string to connect to MongoDB, given a server endpoint (e.g. localhost:27017). This function assumes that MongoDB was configured with the credentials of a user root with password mongo.
Creates a client connection to the MongoDB service, and panics if the connection could not be established.
Attempts to generate a single client for the MongoDB sevice, without error checks. This could be used to perform connections and evaluate if they could actually be estalished.