mirror of
https://github.com/fiatjaf/khatru.git
synced 2026-06-06 10:41:12 +02:00
update blossom example to use a different database.
closes https://github.com/fiatjaf/khatru/issues/36
This commit is contained in:
@@ -18,7 +18,8 @@ func main() {
|
||||
bl := blossom.New(relay, "http://localhost:3334")
|
||||
|
||||
// create a database for keeping track of blob metadata
|
||||
bl.Store = blossom.EventStoreBlobIndexWrapper{Store: db, ServiceURL: bl.ServiceURL}
|
||||
// (do not use the same database used for the relay events)
|
||||
bl.Store = blossom.EventStoreBlobIndexWrapper{Store: blobdb, ServiceURL: bl.ServiceURL}
|
||||
|
||||
// implement the required storage functions
|
||||
bl.StoreBlob = append(bl.StoreBlob, func(ctx context.Context, sha256 string, body []byte) error {
|
||||
|
||||
Reference in New Issue
Block a user