Flash message in Expressjs

I want to show a failed flash message when user credential is not in the database.please help me

try alert("error")

works similar to console.log() but makes a pop up in the browser window.