package main

import (
	log "github.com/sirupsen/logrus"
	"krakatoa.net/backend/modules/configs/kraSettingsConfig"
	"krakatoa.net/backend/modules/configs/serverConfig"
	serverconfig "krakatoa.net/backend/modules/configs/serverConfig"
	"krakatoa.net/backend/modules/logger"
	"krakatoa.net/backend/modules/mongo"
	"krakatoa.net/backend/servers/minecraft"
	"krakatoa.net/backend/servers/web"
)

func init() {
	serverConfig.LoadServerConfig()

	if serverconfig.Cfg.Debug {
		log.SetLevel(log.DebugLevel)
	}

	kraSettingsConfig.LoadKraSettingsConfig()
	logger.Init()
	mongo.InitDatabase()
}

func main() {
	web.RunServer()
	go web.Test()

	minecraft.RunServer()
}

// aa

/*
	"u"nsigned can hold only positive values
	signed can hold negative and positve values
*/

// TODO: longer url when player joined for streamer protection
