Converting server to coffee script