Skip to main content

Posts

Showing posts with the label Electron

electron-db 0.16: A Tiny JSON Database for Electron, Now with Promises and Speed

electron-db 0.16 is out: the small JSON-file database for Electron now has async/await, answers lookups by id in a hundredth of a millisecond, and saves a thousand inserts in 22 ms instead of 55 seconds. If you build a desktop app with Electron, you hit the same question early: where do I keep the app's data? A full database means native modules, rebuilds for every Electron version and a schema. Often you just need a few tables of records that survive a restart. That is what electron-db is for. Each table is one readable JSON file in your app's data folder. There are no dependencies and no native code, so npm install is the whole setup, and the API reads like a tiny SQL: create a table, insert rows, then get, update and delete them with a where clause. Getting started Install it in your Electron app: npm install electron-db Then use it from the main process: const db = require('electron-db'); db.createTable('customers', (succ, msg) => { console.lo...