aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-08-05 06:35:19 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-08-07 18:06:32 +0100
commit55f56418df58d196daa97f3c08e3b6305e831b82 (patch)
tree43e2ff7002a89be5d3f3590ddd81f1f2f3084308 /cmd
parenta6e42d899cde380f513710d07787ba11dfbe229a (diff)
Use bootstrap
Move templates and static under server/
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cashierd/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go
index 67af7cf..b530af9 100644
--- a/cmd/cashierd/main.go
+++ b/cmd/cashierd/main.go
@@ -29,8 +29,9 @@ import (
"github.com/nsheridan/cashier/server/config"
"github.com/nsheridan/cashier/server/fs"
"github.com/nsheridan/cashier/server/signer"
+ "github.com/nsheridan/cashier/server/static"
"github.com/nsheridan/cashier/server/store"
- "github.com/nsheridan/cashier/templates"
+ "github.com/nsheridan/cashier/server/templates"
)
var (
@@ -359,6 +360,7 @@ func main() {
r.Methods("GET").Path("/revoked").Handler(appHandler{ctx, listRevokedCertsHandler})
r.Methods("POST").Path("/admin/revoke").Handler(CSRF(appHandler{ctx, revokeCertHandler}))
r.Methods("GET").Path("/admin/certs").Handler(CSRF(appHandler{ctx, listAllCertsHandler}))
+ r.PathPrefix("/").Handler(http.FileServer(static.FS(true)))
logfile := os.Stderr
if config.Server.HTTPLogFile != "" {
logfile, err = os.OpenFile(config.Server.HTTPLogFile, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0660)