Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAppNil = errors.New("app is nil")
)
Functions ¶
This section is empty.
Types ¶
type Option ¶
func WithAppConfig ¶ added in v0.0.3
func WithMiddlewares ¶
WithMiddlewares is the option that adds middlewares to the server.
Example:
WithMiddlewares(middleware.WithRecover())
func WithPostHook ¶ added in v0.0.3
func WithPostHook(hook ...fiber.OnShutdownHandler) Option
type Server ¶
type Server struct {
// Legacy attribute for fiber app
*fiber.App
// contains filtered or unexported fields
}
Server is a struct to handle server
func NewWithDefaultConfig ¶
NewWithDefaultConfig creates a new server with default config This config choosen by the author of the package
func (*Server) Listen ¶
func (s *Server) Listen(address string, config ...fiber.ListenConfig) error
Listen starts the server with the given address and config It will shutdown the server gracefully when os.Interrupt, syscall.SIGTERM, or syscall.SIGQUIT signal is received It will return error if the server failed to start
Click to show internal directories.
Click to hide internal directories.