Skip to content
Permalink
Browse files

印出所有 request 的網址

  • Loading branch information
eugenechen0514 committed Oct 18, 2018
1 parent 53cdb6a commit 2c2a78e077f34592d3740a794a8dc3f703b7b03b
Showing with 6 additions and 0 deletions.
  1. +6 −0 app.js
6 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);

0 comments on commit 2c2a78e

Please sign in to comment.
You can’t perform that action at this time.