Skip to content

Commit

Permalink
印出所有 request 的網址
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenechen0514 committed Oct 18, 2018
1 parent 53cdb6a commit 2c2a78e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.js
Expand Up @@ -86,6 +86,12 @@ app.use(express.urlencoded({ extended: false }));
app.use(cookieParser()); app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public'))); 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('/', indexRouter);
app.use('/users', usersRouter); app.use('/users', usersRouter);


Expand Down

0 comments on commit 2c2a78e

Please sign in to comment.