// server.go
package main

import (
	"os"
	"pool/internal/db"
	"pool/internal/server"

	"pool/internal/utility"
)

func start(coin string, DbCtx *db.DbContext) {
	server.Start(coin, DbCtx)
}

func stop() {
	server.Stop()
}

func main() {
	coin := utility.GetCoin("server.conf")
	dbctx := db.InitDb(coin, "server")

	start(coin, dbctx)

	stop()

	db.StopDb(coin, "server")

	os.Exit(0)
}
