From 07e8ef537dbfd0e8f234a62778d58d3aabdb7230 Mon Sep 17 00:00:00 2001 From: donavon04 Date: Thu, 28 Nov 2024 16:24:34 -0700 Subject: [PATCH 1/6] Update app.js --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 21abde2..85c681e 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,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,7 +17,7 @@ const db = process.env.DB || "LicenseTracker"; // Database details const pool = mariadb.createPool({ - host: "192.168.2.56", + host: "192.168.2.54", user: "root", password: "U&P7UH1mhRG@JF2K", database: "LicenseTracker" From 976eaaad69e06c09599359f2566a2566f0dab152 Mon Sep 17 00:00:00 2001 From: donavon04 Date: Thu, 28 Nov 2024 16:42:49 -0700 Subject: [PATCH 2/6] Update app.js --- app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.js b/app.js index 85c681e..713e2ba 100644 --- a/app.js +++ b/app.js @@ -29,6 +29,8 @@ let pollrate = "5000"; // 5 Seconds //Api Key const token = "&v94gt8ZHFTTTeuT"; +console.log("Trying to connect to database " + dbip); + //Allows the clients to check if the server is alive app.get('/api', (req, res) => { console.log("Welcome to the MPE licenses api"); From a82af8c8e8b56a6202f1d54659a5f9ca6c3ed187 Mon Sep 17 00:00:00 2001 From: donavon04 Date: Thu, 28 Nov 2024 16:43:44 -0700 Subject: [PATCH 3/6] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 713e2ba..b1783ff 100644 --- a/app.js +++ b/app.js @@ -29,7 +29,7 @@ let pollrate = "5000"; // 5 Seconds //Api Key const token = "&v94gt8ZHFTTTeuT"; -console.log("Trying to connect to database " + dbip); +console.log("Trying to connect to database " + dbip + ":" + ); //Allows the clients to check if the server is alive app.get('/api', (req, res) => { From 4cfa0f29c921308a2c2ab5fe2ecead633cb21ed8 Mon Sep 17 00:00:00 2001 From: donavon04 Date: Thu, 28 Nov 2024 16:46:51 -0700 Subject: [PATCH 4/6] Update app.js --- app.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/app.js b/app.js index b1783ff..85c681e 100644 --- a/app.js +++ b/app.js @@ -29,8 +29,6 @@ let pollrate = "5000"; // 5 Seconds //Api Key const token = "&v94gt8ZHFTTTeuT"; -console.log("Trying to connect to database " + dbip + ":" + ); - //Allows the clients to check if the server is alive app.get('/api', (req, res) => { console.log("Welcome to the MPE licenses api"); From 1765dabae048f84c2bda962e5b853ecfcd47a5b1 Mon Sep 17 00:00:00 2001 From: donavon04 Date: Fri, 29 Nov 2024 08:34:46 -0700 Subject: [PATCH 5/6] Update app.js --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 85c681e..91554e5 100644 --- a/app.js +++ b/app.js @@ -17,10 +17,10 @@ const db = process.env.DB || "LicenseTracker"; // Database details const pool = mariadb.createPool({ - host: "192.168.2.54", - user: "root", - password: "U&P7UH1mhRG@JF2K", - database: "LicenseTracker" + dbip, + dbusername, + dbpassword, + db }); //Initialize pollrate variable From dcf022ea688e7bc79b407fd4e8e5ceb9644dcbca Mon Sep 17 00:00:00 2001 From: donavon04 Date: Fri, 29 Nov 2024 08:39:32 -0700 Subject: [PATCH 6/6] Update app.js --- app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.js b/app.js index 91554e5..5813e62 100644 --- a/app.js +++ b/app.js @@ -23,6 +23,8 @@ const pool = mariadb.createPool({ db }); +console.log(dbip + " is our database"); + //Initialize pollrate variable let pollrate = "5000"; // 5 Seconds