Challange 1 Solution
Video Course on Building Web Applications with Node.jsSometimes node (npm) can install to a parent directory node_modules folder if it finds one. Not where you expect it.
fs.readFile
actually buffers to whole file into memory before invoking your callbackit's also possible to stream a file as being read (doesn't say which module)
recommend a package to interact with REST services: 'request'also 'XMLHttpRequest' - more lightweight -it's cross platform, works on client and server (with browserify)
use underscore to extend the objectmodule.exports = Person
if your object has just one object (like a person or an order) you can use this pattern
or
you can use
exports.Logger = Logger
then in app.js
var logger = new logger.Logger;
the exports
object is what is returned by require