picgo/main.go

19 lines
301 B
Go
Raw Normal View History

2024-07-11 21:25:58 +08:00
package main
import (
"log"
"net/http"
"picgo/router"
)
func main() {
// 创建路由
r := router.InitRouter()
// 启动HTTP服务器
log.Println("Serving on http://localhost:8082")
err := http.ListenAndServe(":8082", r)
if err != nil {
log.Fatalf("Failed to start server: %v", err)
}
}