Random messages, logging refactor

This commit is contained in:
James Shiffer
2023-10-08 19:10:47 -07:00
parent 81b75d3546
commit 2809c29c9a
4 changed files with 61 additions and 36 deletions

View File

@@ -8,6 +8,7 @@ import { Database, open } from 'sqlite';
import express = require('express');
import 'dotenv/config';
import { ScoreboardMessageRow, ScoreboardUserRow } from './models';
import { logInfo } from './discord/util';
const app = express();
app.use(express.static('public'));
@@ -36,8 +37,8 @@ app.get('/', async (req, res) => {
});
app.listen(port, async () => {
console.log('[web] Opening database...');
logInfo('[web] Opening database...');
db = await openDb();
console.log('[web] Database ready.');
console.log(`[web] Listening on port ${port}`);
logInfo('[web] Database ready.');
logInfo(`[web] Listening on port ${port}`);
});