aboutsummaryrefslogtreecommitdiff
path: root/cmd/server/main.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-19 21:13:34 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-19 21:13:34 +0200
commit049b9acbd9635c206f5eeb01074b5d63803c4cd5 (patch)
treefe2caacb21445edcb93f13ab73ed5f0d1430c65a /cmd/server/main.go
parentb8b6d3037c524575f140650ac243c16df6a98a92 (diff)
downloadlens-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/main.go')
-rw-r--r--cmd/server/main.go4
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 (