Spaces:
Configuration error
Configuration error
BOHE
commited on
Commit
·
772cf93
1
Parent(s):
7687ace
开端口
Browse files
start.go
CHANGED
|
@@ -38,10 +38,10 @@ func run() error {
|
|
| 38 |
http.HandleFunc("/api/", api.Handler)
|
| 39 |
|
| 40 |
port := fmt.Sprintf(":%d", config.Port)
|
| 41 |
-
fmt.Printf("Server is running on http://
|
| 42 |
|
| 43 |
// 启动服务器
|
| 44 |
-
if err := http.ListenAndServe(port, nil); err != nil {
|
| 45 |
return fmt.Errorf("启动服务器失败: %w", err)
|
| 46 |
}
|
| 47 |
return nil
|
|
|
|
| 38 |
http.HandleFunc("/api/", api.Handler)
|
| 39 |
|
| 40 |
port := fmt.Sprintf(":%d", config.Port)
|
| 41 |
+
fmt.Printf("Server is running on http://0.0.0.0%s\n", port)
|
| 42 |
|
| 43 |
// 启动服务器
|
| 44 |
+
if err := http.ListenAndServe("0.0.0.0"+port, nil); err != nil {
|
| 45 |
return fmt.Errorf("启动服务器失败: %w", err)
|
| 46 |
}
|
| 47 |
return nil
|