A quick ajax example in Sinatra. How to wait for a server-side process to wrap up before refreshing a main page.