mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Stat.js merge with logger.js, added ids.js
This commit is contained in:
parent
892bfff54e
commit
5dfcb7d8ae
4 changed files with 112 additions and 35 deletions
|
@ -25,13 +25,11 @@ const httpsport = 8443
|
|||
const express = require('express')
|
||||
const vhost = require('vhost')
|
||||
const logger = require('./utils/logger.js')
|
||||
logger.setNoLogReadInterval()
|
||||
logger.Load()
|
||||
const utils = require('./utils/utils.js')
|
||||
const fs = require('fs')
|
||||
const http = require('http')
|
||||
const https = require('https')
|
||||
const stat = require('./utils/stat.js')
|
||||
stat.Load()
|
||||
|
||||
const loggableKeywords = [
|
||||
'user.js'
|
||||
|
@ -73,12 +71,11 @@ app.use(function (req, res, next) {
|
|||
return req.url.includes(x)
|
||||
})
|
||||
if (toLog) { logger.LogReq(req) }
|
||||
if (res.statusCode !== 404) { stat.LogStat(req.url) }
|
||||
if (res.statusCode !== 404) { logger.LogStat(req.url) }
|
||||
})
|
||||
next()
|
||||
})
|
||||
|
||||
|
||||
Object.keys(modules).forEach(function (k, i) {
|
||||
let x = modules[k]
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue