With focus on how errors are handled:
There's the style that
fs
promotes: One callback where the first argument is an error (if any), and the remaining are response values.The core library confusingly doesn't always pass an error to the first argument of a callback.
http.get
, for example.Another style is to have two callbacks (callback & errback). Promoted by http://howtonode.org/control-flow-part-ii