添加在线调试 api

This commit is contained in:
2025-03-08 10:59:31 +08:00
parent 053041ae34
commit 5786ac9d99
28 changed files with 236 additions and 539 deletions

View File

@@ -1,7 +1,6 @@
package main
import (
"math/rand"
"net/http"
"time"
)
@@ -14,8 +13,9 @@ func main() {
func mock() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
waiting := rand.Intn(450) + 50
time.Sleep(time.Duration(waiting) * time.Millisecond)
// waiting := rand.Intn(450) + 50
// time.Sleep(time.Duration(waiting) * time.Millisecond)
time.Sleep(200 * time.Millisecond)
w.Write([]byte("Hello World"))
})

View File

@@ -1,6 +1,7 @@
# 应用配置
APP_CTRL_PORT=18080
APP_DATA_PORT=18081
APP_WEB_PORT=8848
APP_LOG_MODE=dev# dev | test
# 数据库配置