mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added merger.sh, and minor logging improvement
This commit is contained in:
parent
b2b0e862dd
commit
68c6b2b636
2 changed files with 13 additions and 1 deletions
|
@ -74,8 +74,9 @@ function LogReq (req, toFile, sc) {
|
|||
|
||||
if (sc !== undefined && sc === 404) { logEntry += dl + sc }
|
||||
|
||||
logEntry += C()
|
||||
if (!toFile) {
|
||||
Log(logEntry + C())
|
||||
Log(logEntry)
|
||||
} else {
|
||||
let defLogs = GetDateString() + dl + logEntry
|
||||
|
||||
|
|
11
utils/merge.sh
Executable file
11
utils/merge.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
p="/home/qminer/nodeServ"
|
||||
|
||||
cp -v $p/public/data.json /tmp/data.json
|
||||
node $p/utils/merger.js /tmp/data.json
|
||||
|
||||
mv -v $p/public/data.json "$p/public/backs/data.json $(date)"
|
||||
mv -v $p/utils/newData $p/public/data.json
|
||||
|
||||
echo Done
|
Loading…
Add table
Add a link
Reference in a new issue