feat: 基本HTTP服务器
- REST API: health用于检测服务器REST API正常运行
This commit is contained in:
16
interval/api/router.go
Normal file
16
interval/api/router.go
Normal file
@ -0,0 +1,16 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.jinshen.cn/remilia/push-server/interval/api/handler"
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
func NewRouter() http.Handler {
|
||||
r := chi.NewRouter()
|
||||
|
||||
r.Post("/health", handler.Health)
|
||||
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user