mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Merge pull request #83 from orbitdb/docs/readme-cleanup
docs: Clean js examples.
This commit is contained in:
commit
0c01bd22b7
@ -45,7 +45,6 @@ A Go implementation is developed and maintained by the [Berty](https://github.co
|
|||||||
* [Install dependencies](#install-dependencies)
|
* [Install dependencies](#install-dependencies)
|
||||||
* [Browser example](#browser-example)
|
* [Browser example](#browser-example)
|
||||||
* [Node.js example](#nodejs-example)
|
* [Node.js example](#nodejs-example)
|
||||||
* [Workshop](#workshop)
|
|
||||||
- [Development](#development)
|
- [Development](#development)
|
||||||
* [Run Tests](#run-tests)
|
* [Run Tests](#run-tests)
|
||||||
* [Build](#build)
|
* [Build](#build)
|
||||||
@ -88,12 +87,8 @@ import OrbitDB from 'orbit-db'
|
|||||||
// Listen for updates from peers
|
// Listen for updates from peers
|
||||||
db.events.on("update", entry => {
|
db.events.on("update", entry => {
|
||||||
console.log(entry)
|
console.log(entry)
|
||||||
<<<<<<< HEAD
|
|
||||||
const all = await db.all()
|
const all = await db.all()
|
||||||
console.log(all)
|
console.log(all)
|
||||||
=======
|
|
||||||
console.log(await db.all({ limit: 1 }))
|
|
||||||
>>>>>>> 582c826 (docs: Correctly print out db query results.)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Add an entry
|
// Add an entry
|
||||||
@ -101,13 +96,9 @@ import OrbitDB from 'orbit-db'
|
|||||||
console.log(hash)
|
console.log(hash)
|
||||||
|
|
||||||
// Query
|
// Query
|
||||||
<<<<<<< HEAD
|
|
||||||
for await (const record of db.iterator()) {
|
for await (const record of db.iterator()) {
|
||||||
console.log(record)
|
console.log(record)
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
console.log(await db.all({ limit: 1 }))
|
|
||||||
>>>>>>> 582c826 (docs: Correctly print out db query results.)
|
|
||||||
|
|
||||||
await db.close()
|
await db.close()
|
||||||
await orbitdb.stop()
|
await orbitdb.stop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user