Skip to content

mukundgoel/node-dropbox-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-dropbox-clone

Overview

  • A basic Dropbox clone created as part of Codepath's Node.JS Bootcamp
  • The client can send support HTTP commands to create files on the server
  • The client can sync the server directory in a directory on their local machine

######Time spent: 12 hours

To Run:

  1. Run bode server.js or npm start in a terminal window (to start the server)
  2. In another terminal:
  3. For TCP Sync, simply run bode client.js
  4. For HTTP Sync, simply send a supported HTTP command
  5. Or you can do both in different terminals!!

(hint: you can also pass --dir param to set a directory in both the server and client)

######Supported HTTP commands:

  • GET a file or directory: curl -v http://127.0.0.1:8000/foo2.js -X GET

  • POST (update) a file: curl -v http://127.0.0.1:8000/foo2.js -X POST -d "data"

  • PUT (create) a file or directory: curl -v http://127.0.0.1:8000/foo2.js -X PUT -d "data"

  • DELETE a file or directory: curl -v http://127.0.0.1:8000/foo2.js -X DELETE

###Features:

  • Client can make GET requests to get file or directory contents get

  • Client can make HEAD request to get just the GET headers head

  • Client can make PUT requests to create new directories and files with content put

  • Client can make POST requests to update the contents of a file post

  • Client can make DELETE requests to delete files and folders delete

  • Server will serve from --dir or cwd as root dir

  • Client will sync from server over TCP to cwd or CLI dir argument tcp_client

###Additional Features

  • Download initial directory contents when TCP client connects to server client

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published