package main

import (
	_ "sws_xcx/routers"
	"sws_xcx/service"

	"github.com/astaxie/beego"
)

func main() {
	service.ConnectDB()
	if beego.BConfig.RunMode == "dev" || beego.BConfig.RunMode == "test" {
		beego.BConfig.WebConfig.DirectoryIndex = true
		beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	}
	beego.Run()
}
