mirror of
				https://gitlab.com/MrFry/mrfrys-node-server
				synced 2025-04-01 20:24:18 +02:00 
			
		
		
		
	Merge branch 'master' of https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server
This commit is contained in:
		@@ -53,7 +53,8 @@ const fullchainFile = "/etc/letsencrypt/live/qmining.tk/fullchain.pem";
 | 
				
			|||||||
const chainFile = "/etc/letsencrypt/live/qmining.tk/chain.pem";
 | 
					const chainFile = "/etc/letsencrypt/live/qmining.tk/chain.pem";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var certsLoaded = false;
 | 
					var certsLoaded = false;
 | 
				
			||||||
if (startHTTPS && utils.FileExists(privkeyFile) && utils.FileExists(fullchainFile) && utils.FileExists(chainFile)) {
 | 
					if (startHTTPS && utils.FileExists(privkeyFile) && utils.FileExists(fullchainFile) && utils.FileExists(
 | 
				
			||||||
 | 
							chainFile)) {
 | 
				
			||||||
	try {
 | 
						try {
 | 
				
			||||||
		const key = fs.readFileSync(privkeyFile, "utf8");
 | 
							const key = fs.readFileSync(privkeyFile, "utf8");
 | 
				
			||||||
		const cert = fs.readFileSync(fullchainFile, "utf8");
 | 
							const cert = fs.readFileSync(fullchainFile, "utf8");
 | 
				
			||||||
@@ -226,7 +227,8 @@ function UploadFile(req, res, path, next) {
 | 
				
			|||||||
		utils.CreatePath(path, true);
 | 
							utils.CreatePath(path, true);
 | 
				
			||||||
		let d = new Date();
 | 
							let d = new Date();
 | 
				
			||||||
		let fsplit = filename.split('.');
 | 
							let fsplit = filename.split('.');
 | 
				
			||||||
		let fn = d.getHours() + "" + d.getMinutes() + "" + d.getSeconds() + "." + fsplit[fsplit.length - 1];
 | 
							let fn = d.getHours() + "" + d.getMinutes() + "" + d.getSeconds() + "." + fsplit[fsplit.length -
 | 
				
			||||||
 | 
								1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		fstream = fs.createWriteStream(path + "/" + fn);
 | 
							fstream = fs.createWriteStream(path + "/" + fn);
 | 
				
			||||||
		file.pipe(fstream);
 | 
							file.pipe(fstream);
 | 
				
			||||||
@@ -280,6 +282,7 @@ if (startHTTPS && certsLoaded) {
 | 
				
			|||||||
	logger.Log("Cert files does not exists, starting http only!", logger.GetColor("redbg"));
 | 
						logger.Log("Cert files does not exists, starting http only!", logger.GetColor("redbg"));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
logger.Log(msg, logger.GetColor("yellow"));
 | 
					logger.Log(msg, logger.GetColor("yellow"));
 | 
				
			||||||
 | 
					logger.Log("Node version: " + process.version);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function Log(req, toFile, sc) {
 | 
					function Log(req, toFile, sc) {
 | 
				
			||||||
	try {
 | 
						try {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user