如何用不同的方法重写到另一条路由

时间:2019-06-30 11:30:15

标签: node.js express

我的情况很简单

app.use('/health/*', (req, res, next) => {
   // if the requested URL is GET /health/users/list
   // i want to the request to be handled by
   // users.list through the next route handler
});

app.post('/users/list', users.list);

0 个答案:

没有答案