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.
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 ...