设置方法将由express.js称为param



当使用Express时,您会使用app.post('/path')app.get('/path')定义路由。

express还提供了一个函数来定义这样的路由,例如 app.route('POST', '/path')(其中 route是我要寻找的函数)?

您可以用括号符号编程选择方法。例如:

app['post']('/path')
app['post']('/path-2')
app['get']('/path')

最新更新