This commit is contained in:
parent
74fe8195b5
commit
855ebbcb4b
15
cmd/main.go
15
cmd/main.go
@ -2,6 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"time"
|
||||
|
||||
"gitea.timerzz.com/kedaya_haitao/cn-coach-spider/pkg/options"
|
||||
"gitea.timerzz.com/kedaya_haitao/cn-coach-spider/server"
|
||||
"gitea.timerzz.com/kedaya_haitao/cn-coach-spider/spider"
|
||||
@ -11,11 +17,6 @@ import (
|
||||
"github.com/gofiber/fiber/v3/middleware/cors"
|
||||
"github.com/golang/glog"
|
||||
"gorm.io/gorm/logger"
|
||||
"log"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -63,10 +64,10 @@ func main() {
|
||||
r.Get("/health", func(ctx fiber.Ctx) error {
|
||||
return ctx.SendString("ok")
|
||||
})
|
||||
api := r.Group("/api/v1")
|
||||
api := r.Group("/storage/v1")
|
||||
|
||||
server.NewSpiderSvc(spiderCtl, shopType).RegistryRouter(api)
|
||||
if err = r.Listen(":8080"); err != nil {
|
||||
glog.Warningf("server over: %v", err)
|
||||
glog.Warningf("service over: %v", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user