Use HTTP::Server::Simple to create a simple server for testing