abhagupta / codepath-dropbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Node Js BootCamp] Week1 - Assignment 1- Dropbox Demo - Ready for review

abhagupta opened this issue · comments

My app is complete. /cc @codepathreview @codepath .

👍 nice work Abha. The point of this homework was to explore a simple example of a full server application with a REST API and CLI while interacting with the filesystem.
Here's a checklist of things that I'm looking for in this project. You should review the checklist, and make any changes to your project, if necessary.

  • Airbnb has a good summary of appropriate JavaScript coding conventions, you should take a quick look here.
  • You should always try to minimize the number of installed and required dependencies. Modularize your code as much as possible, and avoid globals.
  • Declaring REST routes as separate functions will make your code more extensible and supportable.
  • You should always ensure you're sending the most correct HTTP status codes and all relevant headers. In SOA, the difference between a 500 and a 502 is the difference between an error in your code and an error in a downstream service, which can save hours of debugging. Take a moment to review the list of HTTP status codes and HTTP headers.
  • When consuming TCP APIs, packets should be checked for split messages and buffered to reconstruct the JSON payload.
  • You should always take extra precautions like this when interacting with the filesystem to avoid catastrophic mistakes like removing /.
  • Sync APIs should never be used in production code except during the brief startup phase of a server's lifecycle. Use the safeguards package to protect against this.

In general, you should challenge yourself to create fast stable applications with strict APIs. That's where you'll find all the rough edges of the node.js runtime and earn the next level of mastery.