mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Motd/version fixes, some logging improvements, manual update
This commit is contained in:
parent
c53c181a5b
commit
e0f7027b26
5 changed files with 22 additions and 98 deletions
10
server.js
10
server.js
|
@ -73,10 +73,6 @@ if (startHTTPS && utils.FileExists(privkeyFile) && utils.FileExists(fullchainFil
|
|||
const port = 8080;
|
||||
const httpsPort = 8443;
|
||||
|
||||
var highlights = ["public", "static", "manual", "isgetting", "postfeedback",
|
||||
"postquestions"
|
||||
];
|
||||
|
||||
app.set('view engine', 'ejs');
|
||||
app.use(function(req, res, next) {
|
||||
res.on('finish', function() {
|
||||
|
@ -277,11 +273,7 @@ function Log(req, toFile, sc) {
|
|||
logEntry += sc + " ";
|
||||
logEntry += req.url;
|
||||
var color = logger.GetColor("green");
|
||||
for (var i = 0; i < highlights.length; i++)
|
||||
if (req.url.toLowerCase().includes(highlights[i])) {
|
||||
color = logger.GetColor("blue");
|
||||
break;
|
||||
}
|
||||
|
||||
if (req.url.toLowerCase().includes("isadding"))
|
||||
color = logger.GetColor("yellow");
|
||||
if (!toFile) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue