Run webserver in a thread