Reduce boilerplate and make sinatra routing work on nginx