You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tad/fiber/init.go

22 lines
483 B
Go

1 year ago
package fiber
import (
1 year ago
"fmt"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/favicon"
"github.com/gofiber/fiber/v2/middleware/logger"
1 year ago
)
func NewFiber() *fiber.App {
// инициализация fiber
app := fiber.New()
app.Use(logger.New())
app.Use(cors.New())
app.Use(favicon.New())
app.Use(compress.New())
fmt.Printf("fiber init\n")
return app
1 year ago
}