convert server to coffeescript