🎨 set up routes
This commit is contained in:
9
main.go
9
main.go
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user