mirror of https://github.com/tad17/tad
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.
22 lines
483 B
Go
22 lines
483 B
Go
package fiber
|
|
|
|
import (
|
|
"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"
|
|
)
|
|
|
|
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
|
|
}
|