sinatra and angularjs based betting system