feat(backend): establish gin sqlite service skeleton
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package httpapi
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"cmroubao/backend-api/internal/config"
|
||||
)
|
||||
|
||||
func NewServer(cfg config.Config, handler http.Handler) *http.Server {
|
||||
return &http.Server{
|
||||
Addr: cfg.HTTPAddress,
|
||||
Handler: handler,
|
||||
ReadHeaderTimeout: cfg.ReadHeaderTimeout,
|
||||
ReadTimeout: cfg.ReadTimeout,
|
||||
WriteTimeout: cfg.WriteTimeout,
|
||||
IdleTimeout: cfg.IdleTimeout,
|
||||
MaxHeaderBytes: cfg.MaxHeaderBytes,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user