v.1.0.0. initial push of license-lib
This commit is contained in:
19
server/database.js
Normal file
19
server/database.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// server/database.js
|
||||
const mysql = require('mysql2/promise');
|
||||
const config = require('./config');
|
||||
|
||||
const adminPool = mysql.createPool({
|
||||
host: config.DB_HOST,
|
||||
user: config.DB_USER_ADMIN,
|
||||
password: config.DB_PASS_ADMIN,
|
||||
database: config.DB_NAME,
|
||||
});
|
||||
|
||||
const readerPool = mysql.createPool({
|
||||
host: config.DB_HOST,
|
||||
user: config.DB_USER_READER,
|
||||
password: config.DB_PASS_READER,
|
||||
database: config.DB_NAME,
|
||||
});
|
||||
|
||||
module.exports = { adminPool, readerPool };
|
Reference in New Issue
Block a user