Lets-ftp manages FTP connections and commands in Lets. If you want to deploy over FTP, check out lets-copy.
npm install lets-ftpLetsfile.js
varftp=require('lets-ftp');module.exports=function(lets){varstage=newlets.Stage({host: '1.2.3.4',username: 'me'});// Best practice is to load passwords from a file that isn't checked instage.config(require('./config/stage1'));// Use lets-ftpstage.plugin(ftp());// Do something after connection, maybe upload a filestage.after('connect',function(options,done){this.getConnection(function(c){c.put('local-filename','remote-filename',done);});});// Add stage to lets and name itlets.addStage('stage1',stage);};Run it using e.g. $ lets deploy stage1 (a way to add custom "flows" will be
available soon).
Required:
options.host– Address to serveroptions.username– User to log in withoptions.password– The user's password
See node-ftp for the following options mainly used by that module:
options.portoptions.secureoptions.secureOptionsoptions.connTimeoutoptions.pasvTimeoutoptions.keepalive
That's also where you can find docs on which methods are available on the connection object.
See guidelines for lets.