func New(nodeID, clusterID, storeType, runnerAddr string, isDev bool, adminUserInfo *config.AdminUser, ssl *config.SSL) (*Server, error) {
	managers, err := managers.New(nodeID, clusterID, storeType, runnerAddr, isDev, adminUserInfo, ssl)
	if err != nil {
		return nil, err
	}
	globalMods, err := global.New(clusterID, nodeID, isDev, managers)
	if err != nil {
		return nil, err
	}
	modules, err := modules.New("default-project", clusterID, nodeID, managers, globalMods)
	if err != nil {
		return nil, err
	}
	managers.Sync().SetModules(modules)
	managers.Sync().SetGlobalModules(globalMods.Metrics())
	helpers.Logger.LogInfo(helpers.GetRequestID(context.TODO()), fmt.Sprintf("Creating a new server with id %s", nodeID), nil)
	return &Server{nodeID: nodeID, managers: managers, modules: modules, ssl: ssl}, nil
}
New creates a new server instance
package server
import (
	"context"
	"fmt"
	"log"
	"net/http"
	"strconv"
	"github.com/spaceuptech/helpers"
	"github.com/spaceuptech/space-cloud/gateway/config"
	"github.com/spaceuptech/space-cloud/gateway/managers"
	"github.com/spaceuptech/space-cloud/gateway/modules"
	"github.com/spaceuptech/space-cloud/gateway/modules/global"
	"github.com/spaceuptech/space-cloud/gateway/utils"
)
type Server struct {
	nodeID   string
	ssl      *config.SSL
	modules  *modules.Modules
	managers *managers.Managers
}