is-critter/config.js
Vincent Batts e32d3c9233
All checks were successful
Basic Checking / Explore-Gitea-Actions (push) Successful in 30s
app: logging & in-memory sqlite while in non-prod
The tests are currently working on my laptop, but failing on the CI
actions. 🤔
There have always been errors on it inserting animals to the database,
and now seem like it fails to get routes before the async promise is
fufilled? I'm not sure.

Switch everything to the bole logger, and not the `console.`
stuff.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-09-28 14:13:59 -04:00

17 lines
444 B
JavaScript

var config = module.exports;
var 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";
bole.output({ level: 'info', stream: process.stdout })
} else {
config.db_path = ":memory:";
bole.output({ level: 'debug', stream: process.stdout })
}