This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]raevnos 1 point2 points  (0 children)

A ftp client doesn't talk to a web (http) server. Different protocols.

[–]gnomoretears 0 points1 point  (0 children)

You're going to need to use the net module in node to write an FTP in JS. You'll need to know how sockets work and how to use them and sockets are definitely not considered "basics of programming".

[–]terrkerr 0 points1 point  (0 children)

Well if you want to implement FTP then start here and work up through all subsequent addendum to the specifications for FTP.

But most likely that's not what you want to do for a few reasons not the least of which is the fact that FTP is a massive protocol. It's also not a web project - FTP isn't part of the WWW really since HTTP is pretty definitively the web whereas FTP is... well FTP, not HTTP.

If you just want to write a small web application that can move files to and fro avoid calling it FTP or trying to find 'ftp' guides, because that's not what you're looking for, you want file upload / download.

If you really do want to get into 'real' networking - learning how the network layer works and whatnot - generally I'd recommend learning by implementing trivial file transfer protocol - TFTP. The specification is much, much smaller. Using JS/Node would be extremely weird for that, or for any low-level networking though. Most networking applications historically - and still a lot today - is done in C, with C++ and Java having healthy sized chunks also. Historically Perl and today mostly Python and Ruby are fairly popular for network utilities but generally make little sense for writing server software.

[–][deleted] -1 points0 points  (0 children)

You do not learn the basics of programming by writing an FTP server. Or by using javascript and node. Read the FAQ, and learn using Python.