admin: can give the static dir location

This commit is contained in:
nemunaire 2016-11-19 16:35:39 +01:00
parent 885cae4721
commit 0c6e3e7771

View File

@ -21,6 +21,7 @@ var CloudUsername string
var CloudPassword string
func main() {
var staticDir string
var bind = flag.String("bind", "127.0.0.1:8081", "Bind port/socket")
var dsn = flag.String("dsn", "fic:fic@/fic", "DSN to connect to the MySQL server")
flag.StringVar(&BaseURL, "baseurl", "/", "URL prepended to each URL")
@ -35,10 +36,9 @@ func main() {
log.SetPrefix("[admin] ")
var staticDir string
var err error
log.Println("Checking paths...")
if staticDir, err = filepath.Abs("./static/"); err != nil {
if staticDir, err = filepath.Abs(staticDir); err != nil {
log.Fatal(err)
}
if fic.FilesDir, err = filepath.Abs(fic.FilesDir); err != nil {