- 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
- Run
bode server.js
ornpm start
in a terminal window (to start the server) - In another terminal:
- For TCP Sync, simply run
bode client.js
- For HTTP Sync, simply send a supported HTTP command
- 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
-
Client can make PUT requests to create new directories and files with content
-
Client can make POST requests to update the contents of a file
-
Client will sync from server over TCP to cwd or CLI dir argument
###Additional Features