Skip to content

Commit

Permalink
feat: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Mar 20, 2023
1 parent 40d94ff commit e8ee142
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"encoding/hex"
"fmt"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
"github.com/joho/godotenv"
"github.com/nfnt/resize"
"image/jpeg"
Expand All @@ -28,6 +29,8 @@ func main() {
panic(err)
}

app.Use(logger.New())

app.Get("/:size/:image", func(c *fiber.Ctx) error {
size := strings.Split(c.Params("size", "512x512"), "x")
x, err := strconv.Atoi(size[0])
Expand Down

0 comments on commit e8ee142

Please sign in to comment.