refactor: Split files into src folder, fix parser

This commit is contained in:
dunak-debug committed 2021-09-17 17:20:17 +02:00
1 parent 546eebe1cf
commit 290e23c190
8 files changed
+244 -222

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { createPool } from 'mysql2/promise';
import { config } from './config';
import { parseTypes } from './parser';
export const pool = createPool({
host: config.hosts[0].host || 'localhost',
user: config.username || 'root',
password: config.password || '',
database: config.endpoint || 'es_extended',
charset: 'utf8mb4_unicode_ci',
...config.options,
namedPlaceholders: true,
typeCast: parseTypes,
});