Use default database file if none is specified
This commit is contained in:
parent
74536bd49d
commit
2620d6ee47
@ -558,5 +558,9 @@ func main() {
|
||||
Datasource: os.Getenv("DB_PATH"),
|
||||
Addr: ":8080",
|
||||
}
|
||||
if config.Datasource == "" {
|
||||
config.Datasource = "allowance_planner.db3"
|
||||
log.Printf("Warning: No DB_PATH set, using default of %s", config.Datasource)
|
||||
}
|
||||
start(context.Background(), &config)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user