title: Download file from NodeJS Server to local machine
body: <p>I want to download a textFile from the NodeJS server to the clients local machine with AngularJS as frontend. Where the client storage path is on it's local machine in downloads/testdownload.</p>
  
  <p>in my backend I have:</p>
  
  <pre><code>router.get('/upload', function(req, res){
      var data= fs.readFileSync('../uploads/'+ file);
        fs.writeFile(??+req.file.filename, file, function(err){
            if(err){
                return console.log(err);
            }
            console.log('Saved File: ' + req.file.filename);
        })
  })
  </code></pre>
  
  <p>in my Angular: </p>
  
  <pre><code>this.download= function(){
          $http.get('/creations/upload').then(function success(response){
                      console.log(response.data);
  
              }, function error(response){
                response.data;
           })
      }
  </code></pre>
  
  <p>I linked this function with a button. 
  What path do I have to write in the nodejs fs.writeFile function to save the file to the local machine /downloads/testfile?</p>