res.status(code)

设置响应的 HTTP 状态。它是 Node 的 response.statusCode 的可链接别名。

Sets the HTTP status for the response. It is a chainable alias of Node's response.statusCode.

res.status(403).end()
res.status(400).send('Bad Request')
res.status(404).sendFile('/absolute/path/to/404.png')