This commit is contained in:
2024-12-10 17:36:50 +08:00
parent 983cde2c7d
commit c63a553d6c
19 changed files with 352 additions and 29 deletions

10
main.go
View File

@@ -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)
}