♻️ Refactor config
Make it easier to setup stores
This commit is contained in:
parent
ecae0d5f83
commit
6f06adc37d
12 changed files with 623 additions and 81 deletions
|
|
@ -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"
|
||||
`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue