javascript racer in a sinatra framework