separate example/httpserver into several files