From 927a3a3aab74a3b80ebaaaf0c84ade825fc1d754 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 11 Sep 2024 10:00:55 +0800 Subject: [PATCH] =?UTF-8?q?todo:=20=E8=8E=B7=E5=8F=96IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/server/app.js b/server/app.js index 4191137..1b5cf54 100644 --- a/server/app.js +++ b/server/app.js @@ -16,6 +16,7 @@ const rlog = require('./middleware/request_log'); // error handler onerror(app) +// app.proxy = true; app.use(log4js); // middlewares app.use(bodyparser({ @@ -34,13 +35,13 @@ app.use(views(__dirname + '/views', { app.use(rlog); -// logger -app.use(async (ctx, next) => { - const start = new Date() - await next() - const ms = new Date() - start - console.log(`${ctx.method} ${ctx.url} - ${ms}ms`) -}) +// logger debug: +// app.use(async (ctx, next) => { +// const start = new Date() +// await next() +// const ms = new Date() - start +// console.log(`${ctx.method} ${ctx.url} - ${ms}ms`) +// }) // schedule jobs // syncAids();