EDIT: The solutions proposed in this answer are the right way to achieve this:
On a get
request in node I can do this:
app.get('/', function(req, res) {
res.render('index.ejs', {
message: 'test'
});
});
And send an object in order to set a message along with the request. How can I do the same with a redirect:
i.e. something like this:
function testSend(req, res) {
mess = {message: 'test two'};
res.redirect('/', mess);
//Won't pass to the "get"
}