Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable API changes #100

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
const server = require('./game_server');
console.log("WHAT IS LOGGER");
const fs = require('fs');
const assert = require('assert');
const { reportBug } = require('./src/common/util');

const process = require('process');

console.log("HEHHEHEHEHE FUUFUFUFUFUF");
console.log(process.env.LOGGER_LOCATION);

const path = require('path');
let baseDir = path.dirname(require.main.filename);

Expand All @@ -14,7 +18,11 @@ if (baseDir.endsWith('src')) {

const linkHelper = require('./src/util/link-helper');

const { guaranteeCerts, log, guaranteeDir, authWorkflow, getConfigValue } = require('homegames-common');
const { guaranteeCerts, guaranteeDir, authWorkflow, getConfigValue } = require('homegames-common');

const log = process.env.LOGGER_LOCATION ? require(process.env.LOGGER_LOCATION) : { info: (msg) => console.log(msg), error: (msg) => console.error(msg)};

log.info("THIS IS A TEST HEEREREERER");

const LINK_ENABLED = getConfigValue('LINK_ENABLED', true);
const HTTPS_ENABLED = getConfigValue('HTTPS_ENABLED', false);
Expand Down Expand Up @@ -57,7 +65,7 @@ if (LINK_ENABLED) {
try {
server(certPathArg, null, usernameArg);
} catch (serverErr) {
console.error('Server error: ' + serverErr);
log.error('Server error: ' + serverErr);
reportBug(`Error starting server: ${serverErr}`);
}
});
Expand All @@ -66,7 +74,7 @@ if (LINK_ENABLED) {
try {
server(certPathArg, null, usernameArg);
} catch (serverErr) {
console.error('Server error: ' + serverErr);
log.error('Server error: ' + serverErr);
reportBug(`Error starting server: ${serverErr}`);
}
}
Loading
Loading