func CreateServer(s *session.Session) *Server {
	server := Server{Session: s}
	db, err := database.NewDatabase(&server.Session.Config)
	if err != nil || db == nil {
		panic(err)
	}
	server.Db = db
	server.Session.Nodes = make(map[string]communication.Node, 0)
	server.Session.Config.Modules = make(map[string]config.Module)
	go server.SetupEventsPropagations()
	return &server
}
CreateServer : Initialise the infinite server loop on the master node
package server
import (
	"bufio"
	"crypto/tls"
	"encoding/gob"
	"errors"
	"io"
	"net"
	"strings"
	"github.com/netm4ul/netm4ul/core/communication"
	"github.com/netm4ul/netm4ul/core/config"
	"github.com/netm4ul/netm4ul/core/database"
	"github.com/netm4ul/netm4ul/core/database/models"
	"github.com/netm4ul/netm4ul/core/events"
	"github.com/netm4ul/netm4ul/core/session"
	log "github.com/sirupsen/logrus"
)
type Server struct {
	Session *session.Session
	Db      models.Database
}