mirror of
				https://gitlab.com/MrFry/mrfrys-node-server
				synced 2025-04-01 20:24:18 +02:00 
			
		
		
		
	merge
This commit is contained in:
		@@ -58,11 +58,11 @@ app.get('/', function (req, res) {
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
app.get('*', function (req, res) {
 | 
			
		||||
  res.status(404).render('shared/404')
 | 
			
		||||
  res.status(404).render('404')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
app.post('*', function (req, res) {
 | 
			
		||||
  res.status(404).render('shared/404')
 | 
			
		||||
  res.status(404).render('404')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
exports.app = app
 | 
			
		||||
 
 | 
			
		||||
@@ -366,7 +366,6 @@ app.get('/infos', function (req, res) {
 | 
			
		||||
  if (req.query.motd) {
 | 
			
		||||
    result.motd = motd
 | 
			
		||||
  }
 | 
			
		||||
  logger.LogReq(req)
 | 
			
		||||
  res.json(result)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -87,11 +87,11 @@ app.route('/fosuploader').post(function (req, res, next) {
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
app.get('*', function (req, res) {
 | 
			
		||||
  res.status(404).render('shared/404')
 | 
			
		||||
  res.status(404).render('404')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
app.post('*', function (req, res) {
 | 
			
		||||
  res.status(404).render('shared/404')
 | 
			
		||||
  res.status(404).render('404')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
exports.app = app
 | 
			
		||||
 
 | 
			
		||||
@@ -197,11 +197,11 @@ app.get('/*', function (req, res) {
 | 
			
		||||
// -----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
app.get('*', function (req, res) {
 | 
			
		||||
  res.status(404).render('shared/404')
 | 
			
		||||
  res.status(404).render('404')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
app.post('*', function (req, res) {
 | 
			
		||||
  res.status(404).render('shared/404')
 | 
			
		||||
  res.status(404).render('404')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
exports.app = app
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								server.js
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								server.js
									
									
									
									
									
								
							@@ -31,37 +31,12 @@ const http = require('http')
 | 
			
		||||
const https = require('https')
 | 
			
		||||
 | 
			
		||||
const extraModulesFile = './extraModules.json'
 | 
			
		||||
const modulesFile = './modules.json'
 | 
			
		||||
 | 
			
		||||
const loggableKeywords = [
 | 
			
		||||
  'user.js'
 | 
			
		||||
]
 | 
			
		||||
let modules = {
 | 
			
		||||
  qmining: {
 | 
			
		||||
    path: './modules/qmining/qmining.js',
 | 
			
		||||
    name: 'qmining',
 | 
			
		||||
    urls: [ 'qmining.frylabs.net', 'localhost' ]
 | 
			
		||||
  },
 | 
			
		||||
  main: {
 | 
			
		||||
    path: './modules/main/main.js',
 | 
			
		||||
    name: 'main',
 | 
			
		||||
    urls: [ 'frylabs.net', 'www.frylabs.net' ]
 | 
			
		||||
  },
 | 
			
		||||
  sio: {
 | 
			
		||||
    path: './modules/sio/sio.js',
 | 
			
		||||
    name: 'sio',
 | 
			
		||||
    urls: [ 'sio.frylabs.net' ]
 | 
			
		||||
  },
 | 
			
		||||
  stuff: {
 | 
			
		||||
    path: './modules/stuff/stuff.js',
 | 
			
		||||
    name: 'stuff',
 | 
			
		||||
    urls: [ 'stuff.frylabs.net' ]
 | 
			
		||||
  },
 | 
			
		||||
  old: {
 | 
			
		||||
    path: './modules/old/old.js',
 | 
			
		||||
    name: 'old',
 | 
			
		||||
    urls: [ 'qmining.tk', 'www.qmining.tk' ]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
let modules = JSON.parse(utils.ReadFile(modulesFile))
 | 
			
		||||
 | 
			
		||||
try {
 | 
			
		||||
  if (utils.FileExists(extraModulesFile)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user