I'm having some trouble deciphering the ambiguity between
res.render('viewname', {msg: 'Message' })
and
res.redirect('route')
The redirect function does not let you pass a message, but you may still want to, and the render function will render your view, but it will not change the URL of your web app and will not trigger the function which is required for your route.
The situation I am having is that I have an Invite form, which has an action that changes my URL, and triggers a function at that route which has a success and failure callback, and I would like to redirect users to the Dashboard with a message indicating success or failure.