aboutsummaryrefslogtreecommitdiff
path: root/cmd/cashierd
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-05-22 20:46:09 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-05-22 20:51:47 +0100
commite00e2820e7d460b464965422aab284c6d3b56c70 (patch)
treed2ed189f2ddd2ec8f1d177b3451ec089bc9e0a9f /cmd/cashierd
parent7230bf7945ace2fd974b2585065dc9aad95a3ef5 (diff)
Make template directory configurable
Diffstat (limited to 'cmd/cashierd')
-rw-r--r--cmd/cashierd/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go
index bc460da..e482dde 100644
--- a/cmd/cashierd/main.go
+++ b/cmd/cashierd/main.go
@@ -13,6 +13,7 @@ import (
"log"
"net/http"
"os"
+ "path"
"strings"
"time"
@@ -221,7 +222,7 @@ func main() {
ctx := &appContext{
cookiestore: sessions.NewCookieStore([]byte(config.Server.CookieSecret)),
authprovider: authprovider,
- views: template.Must(template.ParseGlob("templates/*")),
+ views: template.Must(template.ParseGlob(path.Join(config.Server.TemplateDir, "*"))),
sshKeySigner: signer,
}
ctx.cookiestore.Options = &sessions.Options{