summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-02-21 10:33:46 +0100
committerache <ache@ache.one>2019-02-21 10:33:46 +0100
commitdc29c7e989f8761d902e8ffcbc19c131f893303a (patch)
tree351d5385227cdadcdfc59315a9649122db27a36d /server.go
parentSize normalisation (diff)
Config package
Diffstat (limited to 'server.go')
-rw-r--r--server.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/server.go b/server.go
index 3b5c732..ad32199 100644
--- a/server.go
+++ b/server.go
@@ -10,6 +10,7 @@ import (
"flag"
"path"
"syscall"
+ "./config"
)
var tmpl *template.Template
@@ -115,7 +116,7 @@ func handleGet( w http.ResponseWriter, r *http.Request, headOnly bool) {
ListCols []Entry
ListFiles []Entry
}
- tmpl.Execute(w, Collection{ "Title" , cols, files})
+ tmpl.Execute(w, Collection{ filename, cols, files})
case stat.Mode().IsRegular():
if !headOnly {
@@ -324,6 +325,8 @@ func main() {
helpString := `This is the help`
versionString := "0.0.0"
+ config.ReadConfig()
+
const (
defaultDir = "."
usageDir = "the directory to serve"
@@ -339,6 +342,8 @@ func main() {
flag.Parse()
+ fmt.Println(config.Config.Port)
+
if dir == "" {
dir = defaultDir
}