- add currencyadapter.js: list (with pagination+keyword), detail, history, create, update (auto-log rate change to tbl_currency_log), delete (soft), convertAmount helper - add controllers/currency.js and routes/currency.js, auto-mounted at /currency - update dbproc.js: configurable port via HOSTPORT env variable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
598 B
JavaScript
22 lines
598 B
JavaScript
// console.log(libinit.gethost);
|
|
const mysql = require('mysql');
|
|
const dbcon = mysql.createConnection({
|
|
host : process.env.HOSTDB,
|
|
user : process.env.USERDB,
|
|
password : "ssotcel#20i7",
|
|
database : process.env.DBHOST,
|
|
acquireTimeout: 30000,
|
|
insecureAuth: true,
|
|
timezone: 'utc',
|
|
port : process.env.HOSTPORT ?? 3306
|
|
});
|
|
|
|
dbcon.connect(function(err) {
|
|
if (err) {
|
|
console.error('Error connecting: '+process.env.PASSDB+' ' + err.stack);
|
|
return;
|
|
}
|
|
console.log('WS Ver 1.0.0 Proc connected');
|
|
});
|
|
module.exports = dbcon;
|