From 2c2a78e077f34592d3740a794a8dc3f703b7b03b Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 18 Oct 2018 16:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B0=E5=87=BA=E6=89=80=E6=9C=89=20request?= =?UTF-8?q?=20=E7=9A=84=E7=B6=B2=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.js b/app.js index 4d180ec..a153570 100644 --- a/app.js +++ b/app.js @@ -86,6 +86,12 @@ app.use(express.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); +// 印出所有 request 的網址 +app.use(function(req, res, next) { + console.log(req.originalUrl); + next(); +}); + app.use('/', indexRouter); app.use('/users', usersRouter);