add check for unset XBIT_DB

This commit is contained in:
Nick Griffey 2024-02-25 22:31:12 -06:00
parent 68dd2ac323
commit 48a21aa523
1 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,10 @@ func main() {
}
dbpath := os.Getenv("XBIT_DB")
if dbpath == "" {
log.Fatal("XBIT_DB not set")
}
var db TimelineDB
var err error
db.DB, err = sql.Open("sqlite3", dbpath)