1.1.51 • Published 2 years ago
imily-ftp v1.1.51
上传到IISNODE的使用方法
const path = require('path');
let cfg = {
user: 'administrator',
password: 'xxx',
remotePath: '/mynpm/example/',
host: 'npm.lyhuadu.com',
localPath:path.join(__dirname, './example'),
rebootFile:path.join(__dirname,'./example/index.js'),
cacheDir:path.join(__dirname,'./cache'),
}
let upload = new (require('imily-ftp/upload/iisnode'))(cfg);
upload.on('error', function (type, error, args) {
console.log(type + ' error: ' + (error.message || JSON.stringify(error))+args);
});
upload.on('progress', function (file) {
console.log('upload:' +file);
});
upload.on('success', function (result) {
console.log(result);
});
upload.upload('/test1');
upload.upload('/data.txt');
upload.reboot();
1.1.51
2 years ago