package api import ( "wwfc/common" "wwfc/database" ) var ( db database.Connection apiSecret string ) func StartServer(reload bool) { // Get config config := common.GetConfig() apiSecret = config.APISecret // Start SQL db = database.Start(config) db.RegisterEvents(config, []string{ "profile_kicked", "profile_banned", "profile_unbanned", }) } func Shutdown() { db.Close() }