I'm writing a simple application in node js, and i'm having this problem:
Error: connect ECONNREFUSED 127.0.0.1:21
at Object.exports._errnoException (util.js:1034:11)
at exports._exceptionWithHostPort (util.js:1057:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1099:14)
This is the script:
var Client = require('ftp');
var fs = require('fs');
var c = new Client();
c.on('ready', function() {
c.get('/foo/foo1.txt', function(err, stream) {
if (err) throw err;
stream.once('close', function() { c.end(); });
stream.pipe(fs.createWriteStream('foo.local-copy.txt'));
});
});
c.connect('MYIP',21,false,'none','user','password',10000,10000,10000);
c.end();
what's wrong?
via OiRc
No comments:
Post a Comment