2021-12-25 02:16:58 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"orblivion/lbry-id/auth"
|
|
|
|
"orblivion/lbry-id/server"
|
|
|
|
"orblivion/lbry-id/store"
|
|
|
|
)
|
|
|
|
|
|
|
|
func storeInit() (s store.Store) {
|
|
|
|
s = store.Store{}
|
|
|
|
|
|
|
|
s.Init("sql.db")
|
|
|
|
|
|
|
|
err := s.Migrate()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalf("DB setup failure: %+v", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
store := storeInit()
|
2022-06-09 23:04:49 +02:00
|
|
|
srv := server.Init(&auth.Auth{}, &store)
|
2021-12-25 02:16:58 +01:00
|
|
|
srv.Serve()
|
|
|
|
}
|