Added servergit, allqr redirects, fixed install linx

This commit is contained in:
MrFry 2020-03-17 17:56:22 +01:00
parent f0c158361e
commit 6a3593fa6e
4 changed files with 22 additions and 8 deletions

View file

@ -98,12 +98,6 @@ app.post('/postfeedback', function (req, res) {
res.end() res.end()
}) })
app.get('/servergit', function (req, res) {
res.redirect('https://gitlab.com/MrFry/mrfrys-node-server')
res.end()
logger.LogReq(req)
})
function UploadFile (req, res, path, next) { function UploadFile (req, res, path, next) {
var fstream var fstream
req.pipe(req.busboy) req.pipe(req.busboy)
@ -140,6 +134,13 @@ app.route('/badtestsender').post(function (req, res, next) {
logger.LogReq(req) logger.LogReq(req)
}) })
app.get('/allqr.txt', function (req, res) {
res.set('Content-Type', 'text/plain')
res.send(data.toString())
res.end()
logger.LogReq(req)
})
// ------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------
// API // API

View file

@ -41,6 +41,7 @@ app.set('views', [
'./sharedViews' './sharedViews'
]) ])
app.use(express.static('modules/qmining/public')) app.use(express.static('modules/qmining/public'))
app.use(express.static('public'))
app.use(busboy({ app.use(busboy({
limits: { limits: {
fileSize: 10000 * 1024 * 1024 fileSize: 10000 * 1024 * 1024
@ -70,6 +71,10 @@ const simpleRedirects = [
from: '/install', from: '/install',
to: url + '/moodle-test-userscript/stable.user.js?install' to: url + '/moodle-test-userscript/stable.user.js?install'
}, },
{
from: '/servergit',
to: 'https://gitlab.com/MrFry/mrfrys-node-server'
},
{ {
from: '/scriptgit', from: '/scriptgit',
to: 'https://gitlab.com/MrFry/moodle-test-userscript' to: 'https://gitlab.com/MrFry/moodle-test-userscript'
@ -94,6 +99,14 @@ const simpleRedirects = [
from: '/legacy', from: '/legacy',
to: '/allQuestions.html' to: '/allQuestions.html'
}, },
{
from: '/allqr',
to: 'http://api.frylabs.net/allqr.txt'
},
{
from: '/allqr.txt',
to: 'http://api.frylabs.net/allqr.txt'
},
{ {
from: '/infos', from: '/infos',
to: 'http://api.frylabs.net/infos?version=true&motd=true&subjinfo=true' to: 'http://api.frylabs.net/infos?version=true&motd=true&subjinfo=true'

@ -1 +1 @@
Subproject commit f69734e571ec02d6c7de6ecabe8ca83c8bc62623 Subproject commit fe74436ab119a31fdb35f7a3bbae50a572b0fb21

View file

@ -19,7 +19,7 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
const startHTTPS = true const startHTTPS = true
const port = 8080 const port = 80
const httpsport = 5001 const httpsport = 5001
const express = require('express') const express = require('express')