title: uploading file to ftp server in node.js
body: <p>I am trying to upload a file on ftp server using node.js as below-</p>
  
  <p>I am using library- <a href="https://github.com/sergi/jsftp" rel="noreferrer">https://github.com/sergi/jsftp</a></p>
  
  <pre><code>var fs = require('fs');
  var Ftp = new JSFtp({
      host: "ftp.some.net",
      port: 21, // defaults to 21
      user: "username", // defaults to "anonymous"
      pass: "pass",
      debugMode: true // defaults to "@anonymous"
  });
  </code></pre>
  
  <p><strong>Uploading file-</strong></p>
  
  <pre><code>exports.UploadToFtP = function (req, res) {
       Ftp.put('public/Test.html', '/Test/index.html', function (err) {
              if (!err)
                  res.send(200);
              else
                  res.send(err);
          });
  };
  </code></pre>
  
  <p>I tried uploading file with this method above and it responds me back with <code>200 OK</code> . But I get no file on server.
  Is this has to do something with connection time out of server ? Why this is not writing file on server?</p>