Docs for app.render
:
Render a view with a callback responding with the rendered string. This is the app-level variant of res.render()
, and otherwise behaves the same way.
Docs for res.render
:
Render a view with a callback responding with the rendered string. When an error occurs next(err)
is invoked internally. When a callback is provided both the possible error and rendered string are passed, and no automated response is performed.
How can I figure out when to use which one?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…