diff --git a/app.js b/app.js index 21abde2..236d9a7 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,7 @@ const express = require('express'); const mariadb = require('mariadb'); const cors = require('cors'); +const dotenv = require('dotenv'); const app = express(); @@ -9,7 +10,7 @@ app.use(cors()); const version = "V1.1"; -const dbip = process.env.DBIP || "192.168.2.56"; +const dbip = process.env.DBIP || "192.168.2.54"; const dbusername = process.env.DBUSERNAME || "root"; const dbpassword = process.env.DBPASSWORD || "U&P7UH1mhRG@JF2K"; const db = process.env.DB || "LicenseTracker"; @@ -17,12 +18,13 @@ const db = process.env.DB || "LicenseTracker"; // Database details const pool = mariadb.createPool({ - host: "192.168.2.56", - user: "root", - password: "U&P7UH1mhRG@JF2K", - database: "LicenseTracker" + dbip, + dbusername, + dbpassword, + db }); + //Initialize pollrate variable let pollrate = "5000"; // 5 Seconds