🎨 set up routes

This commit is contained in:
landaiqing
2024-08-04 13:11:54 +08:00
parent 3dac34d307
commit f4b69b5d31
8 changed files with 137 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"schisandra-cloud-album/core"
"schisandra-cloud-album/global"
"schisandra-cloud-album/router"
)
func main() {
@@ -10,5 +11,11 @@ func main() {
core.InitConfig()
core.InitLogger()
core.InitGorm()
global.LOG.Error("hello world")
r := router.InitRouter()
addr := global.CONFIG.System.Addr()
global.LOG.Info("Server run on ", addr)
err := r.Run(addr)
if err != nil {
return
}
}