src/config/constants.js
// Import the neccesary modules.
import path from 'path';
/**
* The host of the server of the database. Default is `['localhost']`.
* @type {Array}
*/
export const dbHosts = ['localhost'];
/**
* The name of the database. Default is `beerio`.
* @type {String}
*/
export const dbName = 'beerio';
/**
* Check if this instance of the API is the master. Default is `true`.
* @type {Boolean}
*/
export const master = true;
/**
* The amount of object show per page. Default is `25`.
* @type {Integer}
*/
export const pageSize = 25;
/**
* The port on which the API will run on. Default is `5000`.
* @type {Integer}
*/
export const port = 5000;
/**
* The promise object to override the mongoose promise object. Default is `global.Promise`.
* @type {Promise}
*/
export const { Promise } = global;
/**
* The name of the server. Default is `serv01`.
* @type {String}
*/
export const server = 'serv01';
/**
* The path to the temprary directory. Default is `./tmp`.
* @type {String}
*/
export const tempDir = path.join(process.cwd(), 'tmp');
/**
* The amount of workers on the cluster. Default is `2`.
* @type {Integer}
*/
export const workers = 2;