mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Logging some more stuff in main log, and greasyfork redirection
This commit is contained in:
parent
3828e3111b
commit
5119280303
2 changed files with 16 additions and 2 deletions
16
server.js
16
server.js
|
@ -119,6 +119,7 @@ app.get('/sio', function(req, res) {
|
||||||
app.get('/manual', function(req, res) {
|
app.get('/manual', function(req, res) {
|
||||||
res.write(utils.ReadFile(manFile));
|
res.write(utils.ReadFile(manFile));
|
||||||
res.end();
|
res.end();
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/public', function(req, res) {
|
app.get('/public', function(req, res) {
|
||||||
|
@ -144,6 +145,8 @@ app.get('/legacy', function(req, res) {
|
||||||
res.render('alldata', {
|
res.render('alldata', {
|
||||||
data: d
|
data: d
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post('/postfeedback', function(req, res) {
|
app.post('/postfeedback', function(req, res) {
|
||||||
|
@ -170,21 +173,31 @@ app.post('/isAdding', function(req, res) {
|
||||||
app.get('/menuClick', function(req, res) {
|
app.get('/menuClick', function(req, res) {
|
||||||
res.redirect("/");
|
res.redirect("/");
|
||||||
res.end();
|
res.end();
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/irc', function(req, res) {
|
app.get('/irc', function(req, res) {
|
||||||
res.redirect(ircURL);
|
res.redirect(ircURL);
|
||||||
res.end();
|
res.end();
|
||||||
|
Log(req);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/greasy', function(req, res) {
|
||||||
|
res.redirect("https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help");
|
||||||
|
res.end();
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/scriptgit', function(req, res) {
|
app.get('/scriptgit', function(req, res) {
|
||||||
res.redirect("https://gitlab.com/YourFriendlyNeighborhoodDealer/moodle-test-userscript");
|
res.redirect("https://gitlab.com/YourFriendlyNeighborhoodDealer/moodle-test-userscript");
|
||||||
res.end();
|
res.end();
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/servergit', function(req, res) {
|
app.get('/servergit', function(req, res) {
|
||||||
res.redirect("https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server");
|
res.redirect("https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server");
|
||||||
res.end();
|
res.end();
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
function UploadFile(req, res, path, next) {
|
function UploadFile(req, res, path, next) {
|
||||||
|
@ -222,6 +235,7 @@ app.route('/badtestsender').post(function(req, res, next) {
|
||||||
UploadFile(req, res, recivedFiles, (fn) => {
|
UploadFile(req, res, recivedFiles, (fn) => {
|
||||||
res.render("uploaded");
|
res.render("uploaded");
|
||||||
});
|
});
|
||||||
|
Log(req);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('*', function(req, res) {
|
app.get('*', function(req, res) {
|
||||||
|
@ -256,7 +270,7 @@ function Log(req, toFile, sc) {
|
||||||
var ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress;
|
var ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress;
|
||||||
var logEntry = "[RSND]: " + ip + ", " + req.headers['user-agent'] +
|
var logEntry = "[RSND]: " + ip + ", " + req.headers['user-agent'] +
|
||||||
" " + req.method + " ";
|
" " + req.method + " ";
|
||||||
if (sc == 404)
|
if (sc != undefined && sc == 404)
|
||||||
logEntry += sc + " ";
|
logEntry += sc + " ";
|
||||||
logEntry += req.url;
|
logEntry += req.url;
|
||||||
var color = logger.GetColor("green");
|
var color = logger.GetColor("green");
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help">Script
|
<a href="<%= siteurl %>/greasy">Script
|
||||||
greasyforkon</a> |
|
greasyforkon</a> |
|
||||||
<a href="<%= siteurl %>/irc">IRC</a> |
|
<a href="<%= siteurl %>/irc">IRC</a> |
|
||||||
<a href="<%= siteurl %>/manual">Manual</a> |
|
<a href="<%= siteurl %>/manual">Manual</a> |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue