Serve embed assets fs instead.
This commit is contained in:
parent
967e8e6878
commit
94437e3bab
@ -9,7 +9,6 @@ import (
|
||||
"dwelling-upload/pkg/watcher"
|
||||
"flag"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"os/user"
|
||||
@ -96,7 +95,8 @@ func main() {
|
||||
srv := server.NewHttpServer()
|
||||
|
||||
srv.SetNotFoundHandler(hand.NotFound)
|
||||
srv.ServeStatic("/assets/*filepath", http.Dir(config.WebDir+"/assets"))
|
||||
// srv.ServeStatic("/assets/*filepath", http.Dir(config.WebDir+"/assets"))
|
||||
srv.ServeStatic("/assets/*filepath", hand.AssetsFS())
|
||||
srv.GET("/", hand.Index)
|
||||
srv.POST("/", hand.Upload)
|
||||
srv.GET("/f/:hash/:name", hand.Download)
|
||||
|
Loading…
Reference in New Issue
Block a user