2023-09-29 01:31:05 +00:00
|
|
|
const config = module.exports
|
2023-09-29 20:34:41 +00:00
|
|
|
config.PRODUCTION = process.env.NODE_ENV === 'production'
|
2023-09-29 01:31:05 +00:00
|
|
|
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
|
|
|
|
2023-09-29 20:34:41 +00:00
|
|
|
if (config.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
|
|
|
}
|