convert router js to coffeescript