mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Global logging
This commit is contained in:
parent
857feda5fe
commit
ae46584359
6 changed files with 19 additions and 46 deletions
|
@ -31,8 +31,6 @@ const app = express()
|
|||
const logger = require('../utils/logger.js')
|
||||
const utils = require('../utils/utils.js')
|
||||
const actions = require('../utils/actions.js')
|
||||
const stat = require('../utils/stat.js')
|
||||
stat.Load()
|
||||
|
||||
const recivedFiles = 'public/recivedfiles'
|
||||
const uloadFiles = 'public/f'
|
||||
|
@ -41,13 +39,6 @@ const dataFile = 'public/data.json'
|
|||
const msgFile = 'stats/msgs'
|
||||
|
||||
app.set('view engine', 'ejs')
|
||||
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()
|
||||
})
|
||||
app.use(express.static('public'))
|
||||
app.use(busboy({
|
||||
limits: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue