For an example see BitBalls repo (in app.js and index.stache) on how to dynamically load necessary pages/components/error responses.