You can use res.end and pass in a string that you want to be sent to the client:
res.end('It worked!');
Alternatively, you could render a view and then end the response:
res.render('blah.jade');
res.end();
All that said, redirecting the client is actually the best practice. It makes it so that when they hit the back button in their browser, they can move back seamlessly without getting any "POST required" popups or the like. This is the POST/redirect pattern and you can read more about it at http://en.wikipedia.org/wiki/Post/Redirect/Get.
Comments
Post a Comment