title: How to download file from server using nodejs
body: <p>I want to download file from other website to my pc using expressjs</p>
  
  <p>I tried to use: res.download to download but it seems to be worked on my own server only</p>
  
  <p>Here is my code:</p>
  
  <pre><code>res.download('http://apkleecher.com/download/dl.php?dl=com.instagram.android', 'folder', function(err){
                  if (err) {
                      console.log(err);
                  } else {
  
                  }
              });
  </code></pre>
  
  <p>And it return the error:</p>
  
  <blockquote>
    <p>{ Error: ENOENT: no such file or directory, stat '/home/keitaro/Desktop/google-play/http:/apkleecher.com/download/dl.php?dl=com.instagram.android'
      errno: -2,
      code: 'ENOENT',
      syscall: 'stat',
      path: '/home/keitaro/Desktop/google-play/http:/apkleecher.com/download/dl.php?dl=com.instagram.android',
      expose: false,
      statusCode: 404,
      status: 404 }</p>
  </blockquote>
  
  <p>In my guess, the problem is in the path of url. </p>