mirror of
https://github.com/ZSCNetSupportDept/scheduler.git
synced 2025-10-28 20:45:05 +08:00
修改
This commit is contained in:
10
main.go
10
main.go
@@ -1,9 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/labstack/echo/v4"
|
||||
"zsxyww.com/scheduler/config"
|
||||
"zsxyww.com/scheduler/database"
|
||||
"zsxyww.com/scheduler/route"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -13,8 +15,12 @@ func main() {
|
||||
|
||||
app := echo.New()
|
||||
register(app)
|
||||
|
||||
listenAddress := fmt.Sprintf(":%d", config.ListenPort)
|
||||
|
||||
app.Logger.Fatal(app.Start(listenAddress))
|
||||
}
|
||||
func register(app *echo.Echo) {
|
||||
config.Route(app)
|
||||
config.Middleware(app)
|
||||
route.Route(app)
|
||||
route.Middleware(app)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user