http server runs as thread