Convert server script to CoffeeScript