mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-06 14:16:37 +00:00
fix examples/eventlog.js
This commit is contained in:
parent
57027a5c05
commit
35035badb0
@ -7,20 +7,17 @@ const creatures = ['🐙', '🐷', '🐬', '🐞', '🐈', '🙉', '🐸', '🐓
|
||||
|
||||
console.log("Starting...")
|
||||
|
||||
const ipfs = new IPFS({
|
||||
repo: './orbitdb/examples/ipfs',
|
||||
start: true,
|
||||
EXPERIMENTAL: {
|
||||
pubsub: true,
|
||||
},
|
||||
})
|
||||
|
||||
ipfs.on('error', (err) => console.error(err))
|
||||
|
||||
ipfs.on('ready', async () => {
|
||||
async function main () {
|
||||
let db
|
||||
|
||||
try {
|
||||
const ipfs = await IPFS.create({
|
||||
repo: './orbitdb/examples/ipfs',
|
||||
start: true,
|
||||
EXPERIMENTAL: {
|
||||
pubsub: true,
|
||||
},
|
||||
})
|
||||
const orbitdb = await OrbitDB.createInstance(ipfs, {
|
||||
directory: './orbitdb/examples/eventlog'
|
||||
})
|
||||
@ -52,4 +49,5 @@ ipfs.on('ready', async () => {
|
||||
}
|
||||
|
||||
setInterval(query, 1000)
|
||||
})
|
||||
}
|
||||
main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user