Documentation ¶
Overview ¶
Package server provides a simple HTTP/HTTPS server implementation for serving static and connect API.
Package server provides a simple HTTP/HTTPS server implementation for serving static and connect API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a struct that represents a Fiber server instance with an underlying `fiber.App`, `fiber.Router` for the API endpoints, and a map of `fiber.Router` instances for different API versions.
func Create ¶
func Create(cfgs ...fiber.Config) *Server
Create return a instance os Server Pattern Singleton
func (*Server) Register ¶
API is a method of the `Server` struct that registers the provided API with the server. It creates a new version of the API router, adds the provided API to the router's namespace, and registers the new router with the server's main `app` instance.