Skip to content

Commit 7dc1a37

Browse files
committed
refactor(template, auth): simplify Dist function and update HTTP request handling with fiber client
1 parent 30e81af commit 7dc1a37

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

entgo-sveltekit/main.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
package main
22

33
import (
4-
"app/config/database"
5-
"app/fixtures"
6-
"app/handler"
7-
"app/template"
8-
"os"
9-
104
"github.com/gofiber/fiber/v3"
115
"github.com/gofiber/fiber/v3/middleware/cors"
126
"github.com/gofiber/fiber/v3/middleware/logger"
137
"github.com/gofiber/fiber/v3/middleware/static"
8+
9+
"app/config/database"
10+
"app/fixtures"
11+
"app/handler"
12+
"app/template"
1413
)
1514

1615
const (
@@ -60,7 +59,7 @@ func main() {
6059

6160
// Serve static files
6261
app.All("/*", static.New("", static.Config{
63-
FS: os.DirFS(template.Dist()),
62+
FS: template.Dist(),
6463
// TODO: Migrate to NotFoundHandler (fiber.Handler) - NotFoundFile is deprecated
6564
// NotFoundFile: "index.html",
6665
IndexNames: []string{"index.html"},

0 commit comments

Comments
 (0)