]> git.r.bdr.sh - rbdr/lgtm/blame - config/config.js
Add dotenv to the configs
[rbdr/lgtm] / config / config.js
CommitLineData
927c9aae
BB
1'use strict';
2
3const Getenv = require('getenv');
d6d8813e
BB
4const Dotenv = require('dotenv');
5
6Dotenv.config();
927c9aae
BB
7
8const internals = {};
9
10module.exports = internals.Config = {
d6d8813e
BB
11 port: Getenv.int('LGTM_PORT', 1728), // Port to listen on
12 staticDirectory: Getenv('LGTM_STATIC_DIRECTORY', 'static'), // Location of static assets
13 templateDirectory: Getenv('LGTM_TEMPLATE_DIRECTORY', 'templates'), // Location of templates
14
15 // Config to connect to mysql
16 mysql: {
17 host: Getenv('LGTM_MYSQL_HOST', 'localhost'),
18 port: Getenv('LGTM_MYSQL_PORT', 3306),
19 user: Getenv('LGTM_MYSQL_USER'),
20 password: Getenv('LGTM_MYSQL_PASSWORD'),
21 database: Getenv('LGTM_MYSQL_DATABASE'),
22 tableName: Getenv('LGTM_MYSQL_TABLE_NAME', 'lgtm') // table that will be used to fetch logs
23 }
927c9aae 24};