mirror of
https://github.com/mariadb-corporation/dev-example-blog-samples.git
synced 2025-07-29 12:02:36 +00:00
Update db.js
This commit is contained in:
@ -13,13 +13,7 @@ var pool =
|
||||
|
||||
// Expose a method to establish connection with MariaDB SkySQL
|
||||
module.exports={
|
||||
getConnection: function(){
|
||||
return new Promise(function(resolve,reject){
|
||||
pool.getConnection().then(function(connection){
|
||||
resolve(connection);
|
||||
}).catch(function(error){
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
getConnection: async function(){
|
||||
return pool.getConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user