Unduh file dengan tautan menggunakan ExpressJS

/*index.ejs*/
<body>
	<a href='download/'><img src='/images/downloadbutton.png'/></a>
</body>

/*indexController.js*/
exports.download = async function(req, res, next)
{ 
 
res.download("public/downloads/text.txt";
}
}
Javasper