Code for chapter 11 of Meteor in Action