2021-12-25 02:16:58 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
2022-07-13 18:32:48 +02:00
|
|
|
|
2022-07-12 04:10:19 +02:00
|
|
|
"lbryio/lbry-id/auth"
|
|
|
|
"lbryio/lbry-id/server"
|
|
|
|
"lbryio/lbry-id/store"
|
2021-12-25 02:16:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
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()
|
|
|
|
}
|