Skip to content

Commit

Permalink
Update readme with db2
Browse files Browse the repository at this point in the history
  • Loading branch information
Powersource committed Nov 24, 2023
1 parent 5708865 commit c923c3d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ server.publish(explicitPublicMsg, (err, msg) => {

// NOTE: only `content` is published
})

// with ssb-db2's ssb.db.create, note different option format!
const explicitPublicMsgDb2 = {
content: { type: 'profile' },
allowPublic: true
}

server.db.create(explicitPublicMsgDb2, (err, msg) => {
console.log(msg.value.content)
// => { type: 'profile' }

// NOTE: only `content` is published (as usual)
})
```

private:
Expand Down

0 comments on commit c923c3d

Please sign in to comment.