2023-09-29 01:19:58 +00:00
|
|
|
const config = module.exports;
|
|
|
|
const PRODUCTION = process.env.NODE_ENV === 'production';
|
2023-09-22 20:39:37 +00:00
|
|
|
const bole = require('bole');
|
|
|
|
|
|
|
|
config.express = {
|
|
|
|
port: process.env.EXPRESS_PORT || 3000,
|
|
|
|
ip: '127.0.0.1',
|
|
|
|
};
|
|
|
|
|
|
|
|
if (PRODUCTION) {
|
|
|
|
config.express.ip = '0.0.0.0';
|
2023-09-29 01:19:58 +00:00
|
|
|
config.db_path = 'db/results.db';
|
|
|
|
config.session_token = process.env.SESSION_TOKEN;
|
2023-09-22 20:39:37 +00:00
|
|
|
bole.output({ level: 'info', stream: process.stdout })
|
2023-09-28 18:13:59 +00:00
|
|
|
} else {
|
2023-09-29 01:19:58 +00:00
|
|
|
config.db_path = ':memory:';
|
|
|
|
config.session_token = 'cat bag';
|
2023-09-28 18:13:59 +00:00
|
|
|
bole.output({ level: 'debug', stream: process.stdout })
|
2023-09-22 20:39:37 +00:00
|
|
|
}
|