A Node.js package to help with deploying code. Ftp a folder from your local disk to a remote ftp destination. Does not delete from destination directory.
npm install ftp-deploy
(Need sftp? Check out sftp-upload)
I've taken over from Rick in May 2017, and will start working on the deprecation warnings, and the 'delete remote directory' requests.
I create a file - e.g. deploy.js - in the root of my source code and add a script to its package.json so that I can
npm run deploy.
The most basic usage (stops uploading when an error occurs):
var FtpDeploy = ;var ftpDeploy = ;var config =username: "username"password: "password" // optional, prompted if none givenhost: "ftp.someserver.com"port: 21localRoot: __dirname + "/local-folder"remoteRoot: "/public_html/remote-folder/"include: 'build/version.txt'exclude: '.git' '.idea' 'tmp/*' 'build/*'ftpDeploy;
To be notified of what ftpDeploy is doing:
To continue uploading files even if a file upload fails:
configcontinueOnError = true;ftpDeploy;ftpDeploy;
I use proftpd to create a simple ftp server at test/remote and then run the script at