This commit is contained in:
parent
5b0e17be2e
commit
a2994f3905
@ -4,7 +4,7 @@ FROM golang:1.21-alpine AS go-builder
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# 安装必要的构建工具
|
||||
# RUN apk add --no-cache gcc musl-dev
|
||||
RUN apk add --no-cache gcc musl-dev
|
||||
|
||||
# 设置 GOPROXY 环境变量
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
14
main.go
14
main.go
@ -74,6 +74,20 @@ func main() {
|
||||
router.POST("/speech/synthesize", llmHandler.SynthesizeSpeech)
|
||||
router.GET("/stream-text", llmHandler.StreamText)
|
||||
router.POST("/token", tokenHandler.GenerateToken)
|
||||
// Define routes
|
||||
router.GET("/", func(c *gin.Context) {
|
||||
c.JSON(200, gin.H{
|
||||
"status": "ok",
|
||||
"message": "Service is healthy",
|
||||
})
|
||||
})
|
||||
// Define routes
|
||||
router.GET("/health", func(c *gin.Context) {
|
||||
c.JSON(200, gin.H{
|
||||
"status": "ok",
|
||||
"message": "Service is healthy",
|
||||
})
|
||||
})
|
||||
|
||||
// Serve static files
|
||||
router.Static("/static", "./static")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user