mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
lots of changes
This commit is contained in:
1 parent
ba225c914a
commit
6fa8f3b540
20 files changed
+296
-144
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { compare, genSalt, hash } from "bcryptjs";
|
||||
import { createPool } from "mysql2/promise";
|
||||
import { logger } from "../constants/Logger.mjs";
|
||||
|
||||
/**
|
||||
* DatabaseManager — MySQL pool for dashboard login codes and API tokens.
|
||||
@@ -14,6 +15,11 @@ export class DatabaseManager {
|
||||
connectionLimit: 15,
|
||||
...config,
|
||||
});
|
||||
// Without this listener, unhandled pool-level errors (connection drops,
|
||||
// timeouts) fire an unhandled 'error' event which crashes the process.
|
||||
this.db.on("error", (err) => {
|
||||
logger.error("[DashboardDB] MySQL pool error:", err.code ?? err.message);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user