correctly wrapped the Node.js code samples with $ *** $ fixing compilation errors
wrote middleware, includes TODOs updates #15