move http server into separate module