Flash messages are displayed to the user viewing your site. console.log displays on the console where server is running.
connect-flash is a middleware to implement flash messages. Flash message is displayed on the user browser, next time the user views a page. The flash is typically used in combination with redirects, ensuring that message is available to the next page that is to be rendered. It is like a reminder for last page viewed.
//go to /flash page
app.get('/flash', function(req, res){
req.flash('info', 'Hi there!')
res.redirect('/');
});
//info message shown when user sees / home page