This sample shows how to use cdbToSql in the browser with sql.js.
- Load a
.cdbfile from an<input type="file"> - Convert it to a SQLite database in the browser
- Display the detected tables from
DB_STRUCTURE - Download the generated
.sqlitefile
Serve this folder with any static HTTP server, then open /samples/browser/ in your browser.
Example with VS Code Live Server or any equivalent local server:
- Start a local server from the repository root
- Open
http://127.0.0.1:4173/samples/browser/ - Select a
.cdbfile and click Convert
index.htmldefines the UIapp.jsinitializessql.js, runscdbToSql, and prepares the SQLite download