title: serve pdf files using node js & express
body: <p>All the PDF files are saved in the filesystem on the server, how to make the files to be downloadable in client side.</p>
  
  <p>for Ex : </p>
  
  <pre><code> app.use('/pdfDownload', function(req, res){
    var pathToTheFile = req.body.fileName;
     readFile(pathToTheFile, function(data){
        //code to make the data to be downloadable;
      });
   });
  </code></pre>
  
  <p>is the request made </p>
  
  <pre><code>function readFile(pathToTheFile, cb){
     var fs = require('fs');
     fs.readFile(pathToTheFile, function(err, data){
        //how to make the file fetched to be downloadable in the client requested
        //cb(data);
     }); 
  }
  </code></pre>