feat 版本用v2
All checks were successful
Build image / build (push) Successful in 4m43s

This commit is contained in:
timerzz 2024-09-13 20:47:50 +08:00
parent 74fe8195b5
commit 855ebbcb4b

View File

@ -2,6 +2,12 @@ package main
import ( import (
"context" "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/pkg/options"
"gitea.timerzz.com/kedaya_haitao/cn-coach-spider/server" "gitea.timerzz.com/kedaya_haitao/cn-coach-spider/server"
"gitea.timerzz.com/kedaya_haitao/cn-coach-spider/spider" "gitea.timerzz.com/kedaya_haitao/cn-coach-spider/spider"
@ -11,11 +17,6 @@ import (
"github.com/gofiber/fiber/v3/middleware/cors" "github.com/gofiber/fiber/v3/middleware/cors"
"github.com/golang/glog" "github.com/golang/glog"
"gorm.io/gorm/logger" "gorm.io/gorm/logger"
"log"
"log/slog"
"os"
"os/signal"
"time"
) )
func main() { func main() {
@ -63,10 +64,10 @@ func main() {
r.Get("/health", func(ctx fiber.Ctx) error { r.Get("/health", func(ctx fiber.Ctx) error {
return ctx.SendString("ok") return ctx.SendString("ok")
}) })
api := r.Group("/api/v1") api := r.Group("/storage/v1")
server.NewSpiderSvc(spiderCtl, shopType).RegistryRouter(api) server.NewSpiderSvc(spiderCtl, shopType).RegistryRouter(api)
if err = r.Listen(":8080"); err != nil { if err = r.Listen(":8080"); err != nil {
glog.Warningf("server over: %v", err) glog.Warningf("service over: %v", err)
} }
} }