2023-09-29 01:31:05 +00:00
|
|
|
const config = module.exports
|
|
|
|
const PRODUCTION = process.env.NODE_ENV === 'production'
|
|
|
|
const bole = require('bole')
|
2023-09-22 20:39:37 +00:00
|
|
|
|
|
|
|
config.express = {
|
|
|
|
port: process.env.EXPRESS_PORT || 3000,
|
2023-09-29 01:31:05 +00:00
|
|
|
ip: '127.0.0.1'
|
|
|
|
}
|
2023-09-22 20:39:37 +00:00
|
|
|
|
|
|
|
if (PRODUCTION) {
|
2023-09-29 01:31:05 +00:00
|
|
|
config.express.ip = '0.0.0.0'
|
|
|
|
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:31:05 +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
|
|
|
}
|