func NewHTTPServer(GRPCEndpoint, listenIP, httpPort string) *server {
	handler.SetEndpoint(GRPCEndpoint)
	res := server{
		ListenHost: listenIP,
		ListenPort: httpPort,
		Logger:     log.NewNopLogger(),
	}
	m := httprouter.New()
	m.GET("/v1/accounts", handler.GetAccountsHandler)
	m.GET("/v1/accounts/:id", handler.GetAccountDetailsHandler)
	m.POST("/v1/accounts", handler.PostAccountsHandler)
	m.GET("/v1/payloads", handler.GetPayloadsHandler)
	m.GET("/v1/payloads/:id", handler.GetPayloadDetailsHandler)
	m.POST("/v1/payloads", handler.PostPayloadsHandler)
	http.Handle("/", m)
	return &res
}
NewHTTPServer method constructs new server object and handlers
package api
import (
	"context"
	"net/http"
	"os"
	"os/signal"
	"time"
	"github.com/tendermint/tendermint/libs/log"
	"github.com/julienschmidt/httprouter"
	"github.com/eeonevision/anychaindb/api/handler"
)
type server struct {
	ListenHost string
	ListenPort string
	Logger     log.Logger
}