mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
logging improvements, logging "/" now
This commit is contained in:
parent
373cb4db71
commit
23fcb48fcd
3 changed files with 6 additions and 3 deletions
|
@ -25,7 +25,8 @@
|
|||
"scripts": {
|
||||
"start": "node ./dist/server.js",
|
||||
"dev": "npm run build && NS_DEVEL=1 NS_NOUSER=1 NS_LOGLEVEL=1 node ./dist/server.js",
|
||||
"build": "tsc && bash -c './scripts/postBuild.sh'"
|
||||
"build": "tsc && bash -c './scripts/postBuild.sh'",
|
||||
"export": "tsc && bash -c './scripts/postBuild.sh'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
||||
|
|
|
@ -58,7 +58,8 @@ function GetApp(): ModuleType {
|
|||
})
|
||||
)
|
||||
app.use((req: Request, res, next) => {
|
||||
if (req.url.includes('.html')) {
|
||||
const url = req.url.split('?')[0]
|
||||
if (url.includes('.html') || url === '/') {
|
||||
logger.LogReq(req)
|
||||
}
|
||||
next()
|
||||
|
|
|
@ -66,7 +66,8 @@ function GetApp(): ModuleType {
|
|||
})
|
||||
)
|
||||
app.use((req: Request, res, next) => {
|
||||
if (req.url.includes('.html')) {
|
||||
const url = req.url.split('?')[0]
|
||||
if (url.includes('.html') || url === '/') {
|
||||
logger.LogReq(req)
|
||||
}
|
||||
next()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue