main.go 698 B

123456789101112131415161718192021222324252627282930313233
  1. package main
  2. import (
  3. "kkscrap-go/routers"
  4. routers_init_table "kkscrap-go/routers/init_table"
  5. routers_init_themes "kkscrap-go/routers/init_themes"
  6. "github.com/dabory/abango-rest"
  7. e "github.com/dabory/abango-rest/etc"
  8. "github.com/tidwall/buntdb"
  9. )
  10. func init() {
  11. var err error
  12. if abango.MDB, err = buntdb.Open(":memory:"); err != nil {
  13. e.LogErr("lsdfjlajfladfj", "BuntDB-open-error", err)
  14. }
  15. if abango.QDB, err = buntdb.Open(":memory:"); err != nil {
  16. e.LogErr("ewohnlslwejr", "BuntDB-QryDB-open-error", err)
  17. }
  18. defer abango.MDB.Close()
  19. routers_init_themes.Init()
  20. routers_init_table.Init()
  21. abango.RunServicePoint(routers.RestRouterInit) // Do not change !!
  22. }
  23. func main() {
  24. }