Namespace

startup/server

startup/server

Members

BoltApp

# static constant exports.slackBot

Exports the singleton slackBot for use in HACC-Hui.

View Source startup/server/Slack.js, line 85

string

# static constant loadFileDateFormat

The load/fixture file date format. Used when dumping and restoring the HACC-Hui database.

View Source startup/server/Mongo.js, line 22

Methods

# static exports.getDefinitions(loadJSON, collection)

Returns the definition array associated with collectionName in the loadJSON structure, or an empty array if none was found.

Parameters:
Name Type Description
loadJSON

The load file contents.

collection

The collection of interest.

View Source startup/server/Mongo.js, line 43

# static exports.loadCollection(collection, loadJSON, consolep)

Given a collection and the loadJSON structure, looks up the definitions and invokes define() on them.

Parameters:
Name Type Description
collection

The collection to be loadd.

loadJSON

The structure containing all of the definitions.

consolep

output console.log message if truey.

View Source startup/server/Mongo.js, line 55

# static getRestoreFileAge(loadFileName) → {String}

Returns a string indicating how long ago the load file was created. Parses the file name string.

Parameters:
Name Type Description
loadFileName

The file name.

View Source startup/server/Mongo.js, line 30

A string indicating how long ago the file was created.

String

# static loadDatabase()

If the database is empty, this function looks up the name of the load file in the settings file, and if it is specified, then it reads it in and calls define() on its contents in order to load the database. Console messages are generated when the contents of the load file does not include collections that this function assumes are present. Conversely, if the load file contains collections not processed with this file, a string is also printed out.

View Source startup/server/Mongo.js, line 74