1
0
Fork 0
forked from svrjs/svrjs

Lint out the codebase

This commit is contained in:
Dorian Niemiec 2024-08-25 11:57:45 +02:00
parent 314cf247d4
commit 988ff7c29c
2 changed files with 4 additions and 5 deletions

View file

@ -2,7 +2,6 @@ const fs = require("fs");
const http = require("http"); const http = require("http");
const generateErrorStack = require("../utils/generateErrorStack.js"); const generateErrorStack = require("../utils/generateErrorStack.js");
const serverHTTPErrorDescs = require("../res/httpErrorDescriptions.js"); const serverHTTPErrorDescs = require("../res/httpErrorDescriptions.js");
const getOS = require("../utils/getOS.js");
const generateServerString = require("../utils/generateServerString.js"); const generateServerString = require("../utils/generateServerString.js");
let serverconsole = {}; let serverconsole = {};

View file

@ -136,7 +136,7 @@ if (fs.existsSync(__dirname + "/config.json")) {
configJSONPErr = err2; configJSONPErr = err2;
} }
} catch (err) { } catch (err) {
configJSONRErr = err2; configJSONRErr = err;
} }
} }
@ -295,9 +295,9 @@ let middleware = [
require("./middleware/staticFileServingAndDirectoryListings.js"), require("./middleware/staticFileServingAndDirectoryListings.js"),
]; ];
function addMiddleware(mw) { //function addMiddleware(mw) {
middleware.push(mw); // middleware.push(mw);
} //}
const requestHandler = require("./handlers/requestHandler.js")( const requestHandler = require("./handlers/requestHandler.js")(
serverconsole, serverconsole,