beakerbrowser / webdb

The Web is your database.

Home Page:https://www.npmjs.com/package/@beaker/webdb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass options to DatArchive

garbados opened this issue · comments

commented

WebDB uses DatArchive's defaults and does not pass user options to it. I'd like to be able to pass options through in order to, for example, use custom discovery servers.

Ok sure. What would be the ideal way to pass them? As opts in indexArchive(), or somewhere else?

commented

opts in indexArchive makes sense, like { dat: {...} } so for example:

archive = typeof archive === 'string' ? new (this.DatArchive)(archive)(opts.dat) : archive

I'd be happy to put together a PR later today.

Sure that works for me