]>
Commit | Line | Data |
---|---|---|
1 | 'use strict'; | |
2 | ||
3 | const Getenv = require('getenv'); | |
4 | const Dotenv = require('dotenv'); | |
5 | ||
6 | Dotenv.config(); | |
7 | ||
8 | const internals = {}; | |
9 | ||
10 | module.exports = internals.Config = { | |
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 | } | |
24 | }; |