rewrite server.js in coffeescript