main.go 532 B

12345678910111213141516171819202122232425262728293031
  1. package main
  2. import (
  3. "server/conf"
  4. "server/game"
  5. "server/game/teen"
  6. "server/gate"
  7. "server/hall"
  8. "server/login"
  9. "github.com/name5566/leaf"
  10. lconf "github.com/name5566/leaf/conf"
  11. )
  12. func setupConfig() {
  13. lconf.LogLevel = conf.Server.LogLevel
  14. lconf.LogPath = conf.Server.LogPath
  15. lconf.LogFlag = conf.LogFlag
  16. lconf.ConsolePort = conf.Server.ConsolePort
  17. lconf.ProfilePath = conf.Server.ProfilePath
  18. }
  19. func main() {
  20. setupConfig()
  21. teen.InitGame()
  22. leaf.Run(
  23. gate.Module,
  24. login.Module,
  25. game.Module,
  26. hall.Module,
  27. )
  28. }