Possibly fix startup?

This commit is contained in:
Christopher Cookman 2025-08-31 10:46:31 -06:00
parent dea283fd07
commit e50968e0c1

View file

@ -78,19 +78,10 @@ app.listen(port, host, (err) => {
} }
global.log.info(`Listening on port ${host}:${port}`); global.log.info(`Listening on port ${host}:${port}`);
global.log.debug(`DSN: ${DSN}`); global.log.debug(`DSN: ${DSN}`);
db.getConnection() db.query("SELECT * FROM ACL LIMIT 1;")
.then(conn => {
return conn.query('SELECT 1 FROM ACL LIMIT 1')
.then(() => { .then(() => {
global.log.info('Database connection validated with ACL table.');
dbReady = true; dbReady = true;
conn.release(); global.log.info("Database connection established");
})
.catch(err => {
global.log.error(`Database ACL validation failed: ${err}`);
conn.release();
process.exit(1);
});
}) })
.catch(err => { .catch(err => {
global.log.error(`Database connection failed: ${err}`); global.log.error(`Database connection failed: ${err}`);