O'Reilly logo

CoffeeScript Application Development Cookbook by Mike Hatfield

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transferring files via FTP

File Transfer Protocol (FTP) is nearly as old as the Internet itself, and is still one of the most common methods to transfer files to and from servers.
In this recipe, we will demonstrate how to upload to and download from a remote server using FTP.

Getting ready

We will use the Node-ftp npm module. Node-ftp provides a ride implementation of the FTP specification and allows us to connect to FTP servers, transfer files to and from the server, as well as manage files and directories.

You will require access to an FTP server to run the examples in this section.

To begin, we will install the Node-ftp module with the following command:

npm install ftp --save

We will also use the Q library to help with calling our methods in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required