feat: 基本HTTP服务器
- REST API: health用于检测服务器REST API正常运行
This commit is contained in:
8
interval/api/handler/health.go
Normal file
8
interval/api/handler/health.go
Normal file
@ -0,0 +1,8 @@
|
||||
package handler
|
||||
|
||||
import "net/http"
|
||||
|
||||
func Health(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write([]byte("OK"))
|
||||
}
|
||||
Reference in New Issue
Block a user