Skip to content

Commit

Permalink
refactor: fix typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jan 17, 2024
1 parent f929116 commit 142ba2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import Connection from 'mysql/lib/Connection';
import bluebird from 'bluebird';
import { ConnectionString } from 'connection-string';

const config = new ConnectionString(process.env.DATABASE_URL);
const config = new ConnectionString(process.env.DATABASE_URL as string);
bluebird.promisifyAll([Pool, Connection]);
const db = mysql.createPool({
...config,
host: config.hosts?.[0].name,
port: config.hosts?.[0].port,
connectionLimit: parseInt(process.env.CONNECTION_LIMIT || '5'),
connectionLimit: parseInt(process.env.CONNECTION_LIMIT ?? '5'),
multipleStatements: true,
connectTimeout: 60e3,
acquireTimeout: 60e3,
Expand Down

0 comments on commit 142ba2e

Please sign in to comment.