A simple web-based SQLite browser that lets you inspect SQLite databases created by the SQLite Wasm module and stored in OPFS storage. It also supports running queries and filtering tables.
npm install --save sqlite-wasm-viewer
or
yarn add sqlite-wasm-viewer
To open the viewer:
import { showViewer } from 'sqlite-wasm-viewer';
showViewer();
By default, only files ending with '.db' or '.sqlite' are recognized as SQLite databases, but you can modify this behavior as follows:
import { showViewer, setConfig } from 'sqlite-wasm-viewer';
setConfig({
isSqliteDatabase: databaseName => {
// return true if databaseName is an SQLite db
},
});
showViewer();
A testing app will be available on http://localhost:9000
after running:
yarn start