package main

import (
	"repositories.action2quare.com/ayo/gocommon/flagx"
	"repositories.action2quare.com/ayo/gocommon/logger"
	"repositories.action2quare.com/ayo/houston/client"
	"repositories.action2quare.com/ayo/houston/server"
)

var runAsClient = flagx.Bool("client", false, "")
var runAsServer = flagx.Bool("server", false, "")

func main() {
	flagx.Parse()
	if !*runAsClient && !*runAsServer {
		logger.Fatal("client or server flag is needed")
		return
	}

	if *runAsClient {
		hc, err := client.NewClient(true)
		if err != nil {
			logger.Fatal(err)
			return
		}
		hc.Start()
	} else if *runAsServer {
		svr := server.NewServer()
		svr.Start()
	}

}
