19 lines
301 B
Go
19 lines
301 B
Go
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)
|
|
}
|
|
}
|