September 2011
3 posts
1 tag
"Javascript classes, prototypes and closures".... →
Sep 26th
1 tag
HTTP Mocking made easy with nock
I love testing and I love small easily testable modules in Node. Recently I had to build a library module that interacts with some web services via HTTP. To test this module as it was would mean that I would have to have a sandboxed account on the other end. I also would have to have setup and teardown routines that would reset the sandbox to a known state, etc, etc. What I really wanted for...
Sep 23rd
1 note
1 tag
Configuration files in Node.js made easy with...
Configuration is always a chore, a simple thing you have to do, and keep reinventing every time you start a new project. I usually have the following setup: I have one configuration file per domain and several domains. A domain may be “www”, “couchdb” or a remote service that requires some parametrization like Postmark. These are JSON files that lie in some directory. ...
Sep 22nd
1 note