Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = &core.Module{ OnInit: func() { app := fiber.New(fiber.Config{ DisableStartupMessage: true, ErrorHandler: func(c *fiber.Ctx, e error) error { if err, ok := e.(*fiber.Error); ok { return c.Status(err.Code).JSON(&fiber.Map{"data": nil, "error": err.Message}) } logger.ErrorF("%s %s: %+v", c.Method(), c.Path(), e) return c.Status(fiber.StatusInternalServerError).JSON(&fiber.Map{"data": nil, "error": e.Error()}) }, }) controller.New(app) if err := app.Listen(utils.Fmt(":%s", os.Getenv("API_PORT"))); err != nil { logger.FatalF("Não foi possível iniciar a API na porta %s: %v", os.Getenv("API_PORT"), err) } }}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.