// main
package main

import (
	"net/http"
	_ "net/http/pprof"

	"mongo.games.com/goserver/core"
	_ "mongo.games.com/goserver/core/builtin/filter"
	"mongo.games.com/goserver/core/module"
)

func main() {
	defer core.ClosePackages()
	core.LoadPackages("config.json")
	//usage: go tool pprof http://localhost:6060/debug/pprof/heap
	go func() {
		http.ListenAndServe("localhost:6060", nil)
	}()

	waiter := module.Start()
	waiter.Wait("main")
}
