mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-13 19:55:21 +00:00
Print stack trace on error (#26)
This commit is contained in:
8
main.go
8
main.go
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"codeberg.org/video-prize-ranch/rimgo/pages"
|
||||
@@ -24,7 +25,12 @@ func main() {
|
||||
StreamRequestBody: true,
|
||||
})
|
||||
|
||||
app.Use(recover.New())
|
||||
app.Use(recover.New(recover.Config{
|
||||
EnableStackTrace: true,
|
||||
StackTraceHandler: func (c *fiber.Ctx, e interface{}) {
|
||||
fmt.Println(e)
|
||||
},
|
||||
}))
|
||||
app.Use("/static", filesystem.New(filesystem.Config{
|
||||
Root: http.FS(static.GetFiles()),
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user