Skip to content

Commit d78c53b

Browse files
committed
modify data storage code
1 parent ccd9ba7 commit d78c53b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

19-data-storage/03-mysql.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ db.select = async(con) => {
3333
log(rows);
3434
};
3535

36-
(async() => {
36+
async function main() {
3737
const con = await mysql.createConnection({
3838
host: 'localhost',
3939
user: 'root',
@@ -43,4 +43,6 @@ db.select = async(con) => {
4343

4444
await db[process.argv[2]](con, process.argv[3], process.argv[4]);
4545
await con.end();
46-
})();
46+
}
47+
48+
main();

0 commit comments

Comments
 (0)