File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,12 @@ const logger = require('./logger');
44// parse any arguments
55const argv = require ( 'minimist' ) ( process . argv . slice ( 2 ) ) ;
66
7- const MYSQL_USERNAME = process . env . MYSQL_USERNAME || 'root' ;
8- const MYSQL_PASSWORD = process . env . MYSQL_PASSWORD || '' ;
9- const MYSQL_DATABASE = process . env . MYSQL_DATABASE || 'mysql_note' ;
10- const MYSQL_HOSTNAME = process . env . MYSQL_HOSTNAME || 'localhost' ;
11- const MYSQL_PORT = process . env . MYSQL_PORT || 3306 ;
12-
137const connection = mysql . createConnection ( {
14- host : MYSQL_HOSTNAME ,
15- user : MYSQL_USERNAME ,
16- password : MYSQL_PASSWORD ,
17- database : MYSQL_DATABASE ,
18- port : MYSQL_PORT ,
8+ host : process . env . MYSQL_HOSTNAME || 'localhost' ,
9+ user : process . env . MYSQL_USERNAME || 'root' ,
10+ password : process . env . MYSQL_PASSWORD || '' ,
11+ database : process . env . MYSQL_DATABASE || 'mysql_note' ,
12+ port : process . env . MYSQL_PORT || 3306 ,
1913} ) ;
2014
2115connection . connect ( ( err ) => {
You can’t perform that action at this time.
0 commit comments