Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function start() {
if (!window.ipfs) {
window.ipfs = new IPFS({
repo: 'ipfs-v6-boards-v0',
EXPERIMENTAL: {
pubsub: true
}
});
await new Promise(resolve => {
window.ipfs.on('ready', () => resolve())
})
}
if (!window.orbitDb) {
OrbitDB.addDatabaseType(BoardStore.type, BoardStore)
window.orbitDb = new OrbitDB(window.ipfs)
}
}