Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
db, browser: Add support for persistence in the browser #533
This PR adds support for persistence in browser environments. This is accomplished by using BrowserFS backed by IndexedDB. The bulk of the work is actually in our fork of goleveldb, where we have an open PR.
This solves the limitations of using localStorage as the backing for BrowserFS (limited to 10MB). This PR also includes code which will fallback to using an in-memory database if BrowserFS is not available. This is important because it allows us to continue to use
BrowserFS+IndexedDB support is included in the integration tests and I have also manually tested that it works with the browser example.