]> git.r.bdr.sh - rbdr/dead-drop/blame - config/config.js
Merge branch 'hotfix/1.0.1' into 'master'
[rbdr/dead-drop] / config / config.js
CommitLineData
5e981bca
RBR
1'use strict';
2
3const Getenv = require('getenv');
4
5const internals = {};
6
7/**
8 * The main configuration object for Dead Drop. It will be used to
9 * initialize all of the sub-components. It can extend any property of
10 * the dead drop object.
11 *
12 * @memberof DeadDrop
13 * @typedef {object} tConfiguration
14 * @property {number} [port=1988] the port where the app will listen on
e5fdb2d4 15 * @property {string} twilioAccountSid the twilio account sid used to authorize calls
7404eac9
RBR
16 * @property {DeadDrop.tRedisConfiguration} redis the configuration to
17 * connect to the redis server
5e981bca
RBR
18 */
19module.exports = internals.Config = {
7404eac9 20 port: Getenv.int('DEAD_DROP_PORT', 1988),
e5fdb2d4 21 twilioAccountSid: Getenv('DEAD_DROP_TWILIO_ACCOUNT_SID'),
7404eac9
RBR
22
23 /**
24 * Information required to connect to the redis server
25 *
26 * @memberof DeadDrop
27 * @typedef {object} tRedisConfiguration
28 * @property {string} host the location of the redis host
29 * @property {string} [post=6379] port where redis server is listening
30 */
31 redis: {
32 host: Getenv('DEAD_DROP_REDIS_HOST'),
33 port: Getenv.int('DEAD_DROP_REDIS_PORT', 6379)
34 }
5e981bca 35};