is-critter/config.js
Vincent Batts 380ec821b1
*: switch sessionId to server-side
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-09-28 21:19:58 -04:00

19 lines
536 B
JavaScript

const config = module.exports;
const PRODUCTION = process.env.NODE_ENV === 'production';
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';
config.db_path = 'db/results.db';
config.session_token = process.env.SESSION_TOKEN;
bole.output({ level: 'info', stream: process.stdout })
} else {
config.db_path = ':memory:';
config.session_token = 'cat bag';
bole.output({ level: 'debug', stream: process.stdout })
}