func NewAPIServer(options *config.Options, storage *storage.DB) *Server {
	s := &Server{
		Router: mux.NewRouter(),
		apiConf: options.API,
		storage: storage,
		availablePaths: make([]string, 0),
		config:         make(map[string]interface{}),
	}
	s.ConvertConf(options)
	s.RegisterFunc("/", s.indexFunc)
	s.RegisterFunc("/pool", s.poolFunc)
	s.RegisterFunc("/config", s.configIndexFunc)
	s.RegisterFunc("/config/{key}", s.configFunc)
	s.RegisterFunc("/miner/{miner}", s.minerFunc)
	s.RegisterFunc("/miner/{miner}/rig/{rig}", s.rigFunc)
	s.Use(mux.CORSMethodMiddleware(s.Router))
	http.Handle("/", s)
	return s
}
NewAPIServer creates a Server which follows [standard api](https://github.com/mining-pool/mining-pool-api)
package api
import (
	"encoding/json"
	"net/http"
	"time"
	"github.com/gorilla/mux"
	logging "github.com/ipfs/go-log/v2"
	"github.com/mining-pool/not-only-mining-pool/config"
	"github.com/mining-pool/not-only-mining-pool/storage"
)
var log = logging.Logger("api")
type Server struct {
	*mux.Router
	apiConf *config.APIOptions
	storage *storage.DB
	availablePaths []string
	config         map[string]interface{}
}