Backend cleanup (#146)

* Add ServerRegistration, begin refactoring to match frontend

* move graphData logic into ServerRegistration

* move ping updates/history into ServerRegistration

* start updating main app entry methods

* fix default rates.updateMojangStatus

* fix record loading delays on freshly booted instances

* move database loading logic to method + callback

* use data in frontend for type lookup instead of ping

* cleanup app.js

* reorganize methods to improve flow

* avoid useless mojang updates, remove legacy fields

* rename legacy fields for consistency

* finish restructure around App model

* ensure versions are sorted by release order

* filter errors sent to frontend to avoid data leaks

* fix version listing behavior on frontend

* 5.1.0
This commit is contained in:
Nick Krecklow
2020-04-21 17:59:53 -05:00
committed by GitHub
parent 9eda8d6bdb
commit 4d13965e6b
19 changed files with 822 additions and 823 deletions

View File

@ -1,23 +1,17 @@
/**
* THIS IS LEGACY, UNMAINTAINED CODE
* IT MAY (AND LIKELY DOES) CONTAIN BUGS
* USAGE IS NOT RECOMMENDED
*/
var winston = require('winston');
const winston = require('winston')
winston.remove(winston.transports.Console);
winston.remove(winston.transports.Console)
winston.add(winston.transports.File, {
filename: 'minetrack.log'
});
winston.add(winston.transports.File, {
filename: 'minetrack.log'
})
winston.add(winston.transports.Console, {
'timestamp': function() {
var date = new Date();
timestamp: () => {
const date = new Date()
return date.toLocaleTimeString() + ' ' + date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear().toString().substring(2, 4)
},
colorize: true
})
return date.toLocaleTimeString() + ' ' + date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear().toString().substring(2, 4);
},
'colorize': true
});
module.exports = winston;
module.exports = winston