field-manual
field-manual copied to clipboard
Where does orbitdb data are Stored?
where does orbitdb data are stored? I lost all data while copied the same project folder to another location.
My code is given below:
const ipfsOptions = {
EXPERIMENTAL: {
pubsub: true
}
}
// Create IPFS instance
const ipfs = new IPFSS(ipfsOptions)
ipfs.on('error', (e) => console.error(e))
ipfs.on('ready', async () => {
const orbitdb = await OrbitDB.createInstance(ipfs)
const db = await orbitdb.docs(account )
console.log(db);
await db.load();
await db.put(results.data)
var fulldata = db.get(' ');
console.log(fulldata);
})
You can pass a directory option to the OrbitDB.createInstance call like this:
const orbitdb = OrbitDB.createInstance(ipfs, { directory: 'path/to/data/' })
I tried it.. But actually no use... no data are getting stored in that folder.
@aphelionz where is it stored if you don't add the directory option?
I think in the ./orbitdb dir