Sample code snippet:
index.ejs
<p><a href="<%=link%>" class="btn btn-primary" role="button">Download</a></p>
app.js
var express = require('express'); var router = express.Router();
router.get('/', function(req, res, next) {
res.render('index', {link:'http://download1588.mediafireuserdownload.com/**c5cq****rb2a/***.jpg'});
});
how to get this link as href tag value so that i can download from this link.
Here is the way you would do that with ejs:
<p><a href="<%= link %>" class="btn btn-primary" role="button">Download</a></p>
res.render('index.ejs', { link: "<your link here>" });
Hope this helps!