diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-07-19 21:13:34 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-07-19 21:13:34 +0200 |
commit | 049b9acbd9635c206f5eeb01074b5d63803c4cd5 (patch) | |
tree | fe2caacb21445edcb93f13ab73ed5f0d1430c65a /cmd/server | |
parent | b8b6d3037c524575f140650ac243c16df6a98a92 (diff) | |
download | lens-049b9acbd9635c206f5eeb01074b5d63803c4cd5.tar.gz lens-049b9acbd9635c206f5eeb01074b5d63803c4cd5.tar.bz2 lens-049b9acbd9635c206f5eeb01074b5d63803c4cd5.zip |
ref: Remove static fs on root
Go embed does allow to load parent folder, so I move static fs to
static folder as I think it fits better there than in the root of the
project.
Diffstat (limited to 'cmd/server')
-rw-r--r-- | cmd/server/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go index 8f163df..1591102 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -16,7 +16,6 @@ import ( "gorm.io/driver/sqlite" "gorm.io/gorm" - "git.sr.ht/~gabrielgio/img" "git.sr.ht/~gabrielgio/img/pkg/database/localfs" "git.sr.ht/~gabrielgio/img/pkg/database/repository" "git.sr.ht/~gabrielgio/img/pkg/database/sql" @@ -25,6 +24,7 @@ import ( "git.sr.ht/~gabrielgio/img/pkg/view" "git.sr.ht/~gabrielgio/img/pkg/worker" "git.sr.ht/~gabrielgio/img/pkg/worker/scanner" + "git.sr.ht/~gabrielgio/img/static" ) func main() { @@ -72,7 +72,7 @@ func main() { } r := router.New() - r.GET("/static/{filepath:*}", ext.FileServer(img.StaticFS, "static/")) + r.GET("/static/{filepath:*}", ext.FileServer(static.Static, "static/")) // repository var ( |