From 0daa948c9c6b507f1f087d57941ef35c26c97ae0 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sun, 12 Apr 2020 14:45:43 -0400 Subject: Allowing static files to be served directly from a directory specified in the config. Added a handler to svc.go:Start() to serve /static/ Added default value in conf.go for "StaticFilesDirectory" in the config file. Read the value of StaticFilesDirectory in config to the config global in conf.go --- getwtxt.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'getwtxt.yml') diff --git a/getwtxt.yml b/getwtxt.yml index 8078245..8945993 100644 --- a/getwtxt.yml +++ b/getwtxt.yml @@ -45,6 +45,10 @@ DatabasePath: "getwtxt.db" # tmpl/index.html AssetsDirectory: "assets" +# The path to the static files directory. +# Will be served as /static +StaticFilesDirectory: "/usr/local/getwtxt/static" + # If true, getwtxt will send all log messages, including # requests, to stdout. It will ignore any set log file. # Useful for debugging, but you probably want to keep -- cgit 1.4.1-2-gfad0