aboutsummaryrefslogtreecommitdiff
path: root/resources.go
diff options
context:
space:
mode:
Diffstat (limited to 'resources.go')
-rw-r--r--resources.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/resources.go b/resources.go
index 860971c..30b0de5 100644
--- a/resources.go
+++ b/resources.go
@@ -7,6 +7,21 @@ import (
"net/http"
)
+//go:embed .gitignore LICENSE README.md
+//go:embed *.go go.mod go.sum
+//go:embed *.scfg
+//go:embed static/* templates/*
+var source_fs embed.FS
+
+func serve_source() {
+ http.Handle("/source/",
+ http.StripPrefix(
+ "/source/",
+ http.FileServer(http.FS(source_fs)),
+ ),
+ )
+}
+
//go:embed templates/* static/*
var resources_fs embed.FS
@@ -25,7 +40,7 @@ func serve_static() (err error) {
if err != nil {
return err
}
- http.Handle("/static/{name}",
+ http.Handle("/static/",
http.StripPrefix(
"/static/",
http.FileServer(http.FS(static_fs)),