Implements a http server and json protocol