database.js
/**
         * Starts a connection to the database and resolves the result within a promise.
         * If the connection has been successful, a heartbeat will be toggled in order to keep the
         * connection alive.
         */
Starts a connection to the database and resolves the result within a promise.
If the connection has been successful, a heartbeat will be toggled in order to keep the
connection alive.
Starts a connection to the database and resolves the result within a promise . If the connection has been successful a heartbeat will be toggled in order to keep the connection alive .
startUp() {
            return new Promise((resolve, reject) => {
                this.connection.connect((error) => {
                    if (error) {
                        reject(error);
                    } else {
                        this.toggleHeartbeat();
                        resolve();
                    }
                });
            });
        }
startUp ( ) { return new Promise ( ( resolve , reject ) => { this . connection . connect ( ( error ) => { if ( error ) { reject ( error ) ; } else { this . toggleHeartbeat ( ) ; resolve ( ) ; } } ) ; } ) ; }
Starts a connection to the database and resolves the result within a promise.
Starts a connection to the database and resolves the result within a promise .