mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
fix(config): Throw error when connection string not found
This commit is contained in:
1 parent
8f7fc7bee7
commit
af75f140ac
1 file changed
+2
@@ -2,6 +2,8 @@ import { createPool } from 'mysql2/promise';
|
||||
import { mysql_connection_string, mysql_transaction_isolation_level, typeCast } from '../config.js';
|
||||
|
||||
const connectionString = (() => {
|
||||
if (mysql_connection_string === '') throw new Error(`^1Missing mysql_connection_string in server.cfg! Refer to the documentation^0`);
|
||||
|
||||
if (mysql_connection_string.includes('mysql://')) return { uri: mysql_connection_string };
|
||||
|
||||
const options = mysql_connection_string
|
||||
|
||||
Reference in new issue
Block a user