Embed templates and static files
This commit is contained in:
parent
868d2a7bbd
commit
8edd857d22
11 changed files with 31 additions and 17 deletions
7
cmd/fetch-static/main.go
Normal file
7
cmd/fetch-static/main.go
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "forgejo.gwairfelin.com/max/gonotes/internal/conf"
|
||||
|
||||
func main() {
|
||||
conf.FetchAssets()
|
||||
}
|
||||
|
|
@ -27,8 +27,8 @@ func main() {
|
|||
"/static/",
|
||||
logger(
|
||||
http.StripPrefix(
|
||||
"/static",
|
||||
http.FileServer(http.Dir(conf.Conf.Static.Dir)),
|
||||
"/static/",
|
||||
http.FileServer(http.FS(conf.Static)),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue