diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-08-05 06:35:19 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-08-07 18:06:32 +0100 |
commit | 55f56418df58d196daa97f3c08e3b6305e831b82 (patch) | |
tree | 43e2ff7002a89be5d3f3590ddd81f1f2f3084308 /cmd/cashierd | |
parent | a6e42d899cde380f513710d07787ba11dfbe229a (diff) |
Use bootstrap
Move templates and static under server/
Diffstat (limited to 'cmd/cashierd')
-rw-r--r-- | cmd/cashierd/main.go | 4 |
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) |