File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ const MYSQL_CONFIG = {
11
11
} ;
12
12
13
13
// For use with Heroku ClearDB
14
- // Other mysql: https://www.npmjs.com/package/mysql#establishing -connections
15
- const connection = mysql . createConnection ( process . env . CLEARDB_DATABASE_URL ? process . env . CLEARDB_DATABASE_URL : MYSQL_CONFIG ) ;
16
- const query = promisify ( connection . query . bind ( connection ) ) ;
14
+ // Other mysql: https://www.npmjs.com/package/mysql#pooling -connections
15
+ const pool = mysql . createPool ( process . env . CLEARDB_DATABASE_URL ? process . env . CLEARDB_DATABASE_URL : MYSQL_CONFIG ) ;
16
+ const query = promisify ( pool . query . bind ( pool ) ) ;
17
17
18
18
// Use setUser for storing global user data (persists between installs)
19
19
export async function setUser ( { user } : SessionProps ) {
You can’t perform that action at this time.
0 commit comments