refactoring. remove global state, use new logging, config functions

This commit is contained in:
2018-06-17 16:15:58 +02:00
parent d091398f05
commit 75197310bf
24 changed files with 295 additions and 476 deletions

17
init/conf/config.go Normal file
View File

@@ -0,0 +1,17 @@
package conf
type PixelWebConfig struct {
APIURLExternal string `toml:"api_url_external"`
APIURLInternal string `toml:"api_url_internal"`
StaticResourceDir string `toml:"static_resource_dir"`
TemplateDir string `toml:"template_dir"`
DebugMode bool `toml:"debug_mode"`
}
const DefaultConfig = `# Pixeldrain Web UI server configuration
api_url_external = "https://sia.pixeldrain.com/api" # Used in the web browser, should be a full URL. Not ending with a slash
api_url_internal = "http://127.0.0.1:8080/api" # Used for internal API requests to the pixeldrain server, not visible to users
static_resource_dir = "res/static"
template_dir = "res/template"
debug_mode = false`