Merge branch 'master' of gitlab.com:MrFry/mrfrys-node-server

This commit is contained in:
MrFry 2020-01-15 10:11:15 +01:00
commit 6274236467
2 changed files with 10 additions and 2 deletions

View file

@ -36,6 +36,7 @@ const recivedFiles = 'public/recivedfiles'
const uloadFiles = 'public/f' const uloadFiles = 'public/f'
const dataFile = 'public/data.json' const dataFile = 'public/data.json'
const msgFile = 'stats/msgs' const msgFile = 'stats/msgs'
const motdFile = 'public/motd'
let donateURL = '' let donateURL = ''
try { try {
donateURL = utils.ReadFile('./data/donateURL') donateURL = utils.ReadFile('./data/donateURL')
@ -64,9 +65,16 @@ app.use(bodyParser.json({
app.get('/', function (req, res) { app.get('/', function (req, res) {
// req.hostname // req.hostname
let motd = ''
try {
motd = utils.ReadFile(motdFile)
} catch (e) {
}
res.render('qmining/main', { res.render('qmining/main', {
siteurl: url, siteurl: url,
qa: actions.ProcessQA() qa: actions.ProcessQA(),
motd: motd
}) })
res.end() res.end()
}) })

View file

@ -1,5 +1,5 @@
<center><h2> Q & A: </h3></center> <center><h2> Q & A: </h3></center>
<% for (var i = 0; i < qa.length; i++) { %> <% for (var i = qa.length - 1; i >= 0 ; i--) { %>
<hr> <hr>
<table style="width:100%"> <table style="width:100%">
<td style="vertical-align:middle;text-align:center;width:5%"> <td style="vertical-align:middle;text-align:center;width:5%">