From 988ff7c29c1278746928ff55e2087de96083251d Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 11:57:45 +0200 Subject: [PATCH] Lint out the codebase --- src/handlers/clientErrorHandler.js | 1 - src/index.js | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/handlers/clientErrorHandler.js b/src/handlers/clientErrorHandler.js index 7280afb..9fe81a9 100644 --- a/src/handlers/clientErrorHandler.js +++ b/src/handlers/clientErrorHandler.js @@ -2,7 +2,6 @@ const fs = require("fs"); const http = require("http"); const generateErrorStack = require("../utils/generateErrorStack.js"); const serverHTTPErrorDescs = require("../res/httpErrorDescriptions.js"); -const getOS = require("../utils/getOS.js"); const generateServerString = require("../utils/generateServerString.js"); let serverconsole = {}; diff --git a/src/index.js b/src/index.js index 42f3f84..8a541ca 100644 --- a/src/index.js +++ b/src/index.js @@ -136,7 +136,7 @@ if (fs.existsSync(__dirname + "/config.json")) { configJSONPErr = err2; } } catch (err) { - configJSONRErr = err2; + configJSONRErr = err; } } @@ -295,9 +295,9 @@ let middleware = [ require("./middleware/staticFileServingAndDirectoryListings.js"), ]; -function addMiddleware(mw) { - middleware.push(mw); -} +//function addMiddleware(mw) { +// middleware.push(mw); +//} const requestHandler = require("./handlers/requestHandler.js")( serverconsole,