FTP for gulp/grunt tasks?

I am trying to upload files as a gulp task

gulp.task('ftp', function () {
    return gulp.src('public/js/myapp.js')
            host: '',
            user: 'USER',
            pass: 'PASS',
            port: 22

The above does not work because the default path is root, I need to guide it into var/www/mysite I am not sure where to go from here, I am tired of manually uploading my files when I make changes to them. Any help would be much appreciated.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

22 is usually port for SSH/SFTP protocol, not FTP. try connecting to port 21 if it’s open, otherwise use instead of gulp-ftp

Yeah I am, It’s not working because event without the remote path (thanks for pointing that out) its not uploading anything to any directory. <br> <br>The ftp credentials are correct I tested them by connecting to my server with filezilla. I am using filezilla to see if its uploading anything and it’s not. <br> <br>I wonder if there is something I need to do configuration wise?