Updated Server App

This commit is contained in:
2025-08-09 22:16:43 -04:00
parent cfa87c688a
commit 6479bb5c6f
4 changed files with 15 additions and 6 deletions

View File

@@ -0,0 +1,5 @@
# How to start Web Server
``npm run web``
# How to run Agent Server
``npm run agent``

View File

@@ -27,8 +27,7 @@ module.exports = class PostgresSingleton {
if (this.postgres === null || typeof this.postgres == 'undefined')
this.setup();
}
async stop() {
}
async stop() {}
async query(query, parameters) {
const evaluated = Object.entries(parameters)

View File

@@ -1,3 +1,6 @@
(() => {
const server = new (require('./app.server'))();
server.setup();
server.start();
const socket = null;
})()

View File

@@ -28,7 +28,9 @@ module.exports = class ServerSingleton {
() => console.log(`Server listening on port ${process.env.SERVER_PORT}`));
}
stop() {
if (this.server === null || typeof this.server === "undefined")
return;
this.server.close();
}
setupDatabases() {