From 1fbede69e525b3cd963c07cfcf930bb0132409f2 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Mon, 26 Aug 2024 07:05:04 +0200 Subject: [PATCH] Replace __dirname with process.dirname --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 222f0ab..b338936 100644 --- a/src/index.js +++ b/src/index.js @@ -215,10 +215,10 @@ const { process.serverConfig = {}; let configJSONRErr = undefined; let configJSONPErr = undefined; -if (fs.existsSync(__dirname + "/config.json")) { +if (fs.existsSync(process.dirname + "/config.json")) { let configJSONf = ""; try { - configJSONf = fs.readFileSync(__dirname + "/config.json"); // Read JSON File + configJSONf = fs.readFileSync(process.dirname + "/config.json"); // Read JSON File try { process.serverConfig = JSON.parse(configJSONf); // Parse JSON } catch (err2) {