mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added servergit, allqr redirects, fixed install linx
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
@@ -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'
|
||||||
|
Submodule public/moodle-test-userscript updated: f69734e571...fe74436ab1
@@ -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')
|
||||||
|
Reference in New Issue
Block a user