package main

import (
	"kkscrap-go/routers"
	routers_init_table "kkscrap-go/routers/init_table"
	routers_init_themes "kkscrap-go/routers/init_themes"

	"github.com/dabory/abango-rest"
	e "github.com/dabory/abango-rest/etc"
	"github.com/tidwall/buntdb"
)

func init() {

	var err error
	if abango.MDB, err = buntdb.Open(":memory:"); err != nil {
		e.LogErr("lsdfjlajfladfj", "BuntDB-open-error", err)
	}

	if abango.QDB, err = buntdb.Open(":memory:"); err != nil {
		e.LogErr("ewohnlslwejr", "BuntDB-QryDB-open-error", err)
	}

	defer abango.MDB.Close()

	routers_init_themes.Init()
	routers_init_table.Init()

	abango.RunServicePoint(routers.RestRouterInit) // Do not change !!
}

func main() {
}
