mirror of
https://github.com/snowykami/server-status-server.git
synced 2025-09-07 12:36:27 +00:00
🐛 添加前端页面
This commit is contained in:
@ -16,7 +16,7 @@ import (
|
||||
var h *server.Hertz
|
||||
|
||||
func init() {
|
||||
h = hertz.NewHertz([]config.Option{server.WithHostPorts(":8088")}, []app.HandlerFunc{})
|
||||
h = hertz.NewHertz([]config.Option{server.WithHostPorts(":8090")}, []app.HandlerFunc{})
|
||||
// cv api 状态客户端接口
|
||||
h.Use(cors.Default())
|
||||
|
||||
@ -32,11 +32,11 @@ func init() {
|
||||
{
|
||||
api.GET("/", func(ctx context.Context, c *app.RequestContext) { c.JSON(200, "Hello, api") })
|
||||
api.GET("/status", frontend.OnGetServerStatus)
|
||||
|
||||
}
|
||||
|
||||
// 静态文件
|
||||
h.GET("/*file", frontend.OnGetStaticFile)
|
||||
//h.StaticFS("/", fs)
|
||||
}
|
||||
|
||||
func Run() {
|
||||
|
Reference in New Issue
Block a user