serve pdf files express on server code example
Example 1: node js serve pdf file
app.use('/pdf', express.static(__dirname + '/pathToPDF'));
Example 2: express send pdf to view
res.setHeader('Content-Type', 'application/pdf')
res.setHeader('Content-Disposition', 'inline;filename=yolo.pdf')