mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Removed logging in main
This commit is contained in:
parent
0bf83b721b
commit
3ab3cfea3b
3 changed files with 18 additions and 16 deletions
16
server.js
16
server.js
|
@ -25,24 +25,8 @@ const logger = require('./logger.js')
|
|||
const qmining = require('./qmining.js').app
|
||||
const main = require('./main.js').app
|
||||
|
||||
const stat = require('./stat.js')
|
||||
stat.Load()
|
||||
|
||||
const port = 8080
|
||||
|
||||
function AddLogger (app) {
|
||||
app.use(function (req, res, next) {
|
||||
res.on('finish', function () {
|
||||
logger.LogReq(req, true, res.statusCode)
|
||||
if (res.statusCode !== 404) { stat.LogStat(req.url) }
|
||||
})
|
||||
next()
|
||||
})
|
||||
}
|
||||
|
||||
AddLogger(qmining)
|
||||
AddLogger(main)
|
||||
|
||||
// // https://certbot.eff.org/
|
||||
// const privkeyFile = '/etc/letsencrypt/live/qmining.tk/privkey.pem'
|
||||
// const fullchainFile = '/etc/letsencrypt/live/qmining.tk/fullchain.pem'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue