modify to run via a Sinatra server