From 76a1f48c62b8626e855794f44aed766cb8d44b7e Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 11 Mar 2024 11:11:13 -0500 Subject: [PATCH] Remove UID/GID from Server constructor --- index.js | 4 +--- prod.js | 4 +--- server/Server.js | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 585af22e..79d06c3d 100644 --- a/index.js +++ b/index.js @@ -18,12 +18,10 @@ const PORT = process.env.PORT || 80 const HOST = process.env.HOST const CONFIG_PATH = process.env.CONFIG_PATH || '/config' const METADATA_PATH = process.env.METADATA_PATH || '/metadata' -const UID = process.env.AUDIOBOOKSHELF_UID -const GID = process.env.AUDIOBOOKSHELF_GID const SOURCE = process.env.SOURCE || 'docker' const ROUTER_BASE_PATH = process.env.ROUTER_BASE_PATH || '' console.log('Config', CONFIG_PATH, METADATA_PATH) -const Server = new server(SOURCE, PORT, HOST, UID, GID, CONFIG_PATH, METADATA_PATH, ROUTER_BASE_PATH) +const Server = new server(SOURCE, PORT, HOST, CONFIG_PATH, METADATA_PATH, ROUTER_BASE_PATH) Server.start() diff --git a/prod.js b/prod.js index ca54bfab..70633d5b 100644 --- a/prod.js +++ b/prod.js @@ -23,13 +23,11 @@ const PORT = options.port || process.env.PORT || 3333 const HOST = options.host || process.env.HOST const CONFIG_PATH = inputConfig || process.env.CONFIG_PATH || Path.resolve('config') const METADATA_PATH = inputMetadata || process.env.METADATA_PATH || Path.resolve('metadata') -const UID = process.env.AUDIOBOOKSHELF_UID -const GID = process.env.AUDIOBOOKSHELF_GID const SOURCE = options.source || process.env.SOURCE || 'debian' const ROUTER_BASE_PATH = process.env.ROUTER_BASE_PATH || '' console.log(process.env.NODE_ENV, 'Config', CONFIG_PATH, METADATA_PATH) -const Server = new server(SOURCE, PORT, HOST, UID, GID, CONFIG_PATH, METADATA_PATH, ROUTER_BASE_PATH) +const Server = new server(SOURCE, PORT, HOST, CONFIG_PATH, METADATA_PATH, ROUTER_BASE_PATH) Server.start() diff --git a/server/Server.js b/server/Server.js index 01b1af12..5704814d 100644 --- a/server/Server.js +++ b/server/Server.js @@ -41,13 +41,11 @@ const passport = require('passport') const expressSession = require('express-session') class Server { - constructor(SOURCE, PORT, HOST, UID, GID, CONFIG_PATH, METADATA_PATH, ROUTER_BASE_PATH) { + constructor(SOURCE, PORT, HOST, CONFIG_PATH, METADATA_PATH, ROUTER_BASE_PATH) { this.Port = PORT this.Host = HOST global.Source = SOURCE global.isWin = process.platform === 'win32' - global.Uid = isNaN(UID) ? undefined : Number(UID) - global.Gid = isNaN(GID) ? undefined : Number(GID) global.ConfigPath = fileUtils.filePathToPOSIX(Path.normalize(CONFIG_PATH)) global.MetadataPath = fileUtils.filePathToPOSIX(Path.normalize(METADATA_PATH)) global.RouterBasePath = ROUTER_BASE_PATH