mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
16 lines
511 B
JavaScript
16 lines
511 B
JavaScript
// Adapted from the documentation of https://github.com/mysqljs/mysql,
|
|
// which is licensed under the MIT license; see file mysqljs-License.
|
|
var mysql = require('mysql');
|
|
var pool = mysql.createPool({
|
|
connectionLimit : 10,
|
|
host : 'example.org',
|
|
user : 'bob',
|
|
password : 'secret',
|
|
database : 'my_db'
|
|
});
|
|
|
|
pool.query('SELECT 1 + 1 AS solution', function (error, results, fields) {
|
|
if (error) throw error;
|
|
console.log('The solution is: ', rows[0].solution);
|
|
});
|