♻️ Refactor config

Make it easier to setup stores
This commit is contained in:
Dan Jones 2025-01-26 20:07:45 -06:00
commit 6f06adc37d
12 changed files with 623 additions and 81 deletions

View file

@ -18,7 +18,7 @@ func main() {
quitErr(err)
fmt.Printf("%+v\n", conf)
db, err := store.MakeStore(conf.Conn.Store, conf)
db, err := store.MakeStore(conf.StoreName(), conf)
quitErr(err)
app, err := combluotion.NewApp(config.Version, conf, db)
@ -50,7 +50,9 @@ func getTomlFile() string {
var confStr = `
base_url = "http://localhost:4523/"
[conn]
[stores]
store = "sqlite"
dsn = "store"
[stores.settings.sqlite]
path = "storage"
`