Installation
Install the npm package, connect your application, and add Console when you want to browse your data. A standalone file is also available.
Choose how to install BsonLite
BsonLite is the database. bsonlite-sdk is its npm package. BsonLite Console is the optional desktop and terminal workspace.
Check your environment
| Requirement | Modern BsonLite profile |
|---|---|
| Windows | x64 build 20348+: Windows 11 / Windows Server 2022+ |
| Node.js | 20.19+; Node.js 24 recommended |
| Storage | Private writable filesystem with account access controls |
| Console | The desktop installer includes its own runtime; terminal CLI needs Node.js |
The current standalone download is 0.7.0-alpha.0, an experimental modern build. Existing 4.0 data needs a logical upgrade.
1. Single-file BsonLite
- Download BsonLite.cjs.
- Put it beside your application's
index.js. - Add the code below and run
node index.js.
const BsonLite = require('./BsonLite.cjs');
async function main() {
await BsonLite.connect('myapp');
const users = BsonLite.collection('users');
await users.insertOne({ name: 'Atik' });
console.log(await users.find({}).toArray());
// Keep connected while your application is running.
}
main().catch(console.error);The full file includes its engine and required JavaScript dependencies. No npm installation is needed for BsonLite itself. Your application may still have its own dependencies. Call await BsonLite.disconnect() when your app exits.
2. npm package
Run this command in your Node.js project:
npm i bsonlite-sdkconst BsonLite = require('bsonlite-sdk');
await BsonLite.connect('myapp');The package includes the database engine and uses the same connection and collection API as the standalone file. No tag or version suffix is needed for a new project. See the npm package page. If you already have an older BsonLite database, read the migration guide before upgrading.
ES module imports
// Standalone file:
import BsonLite from './BsonLite.cjs';
// Or the npm package, in a separate application:
// import BsonLite from 'bsonlite-sdk';
await BsonLite.connect('myapp');For Node.js, use an .mjs entry point or "type": "module" in package.json.
3. Optional BsonLite Console
Download the Console setup .exe and run it once. Open BsonLite Console from the desktop or Start Menu. Keep your app running, choose its database and click Connect. The URL stays visible.
The BsonLite + Console bundle includes both files, an optional terminal package and starter examples. See the Console setup guide for GUI, CLI and uninstall instructions.
BsonLite 0.7.0-alpha.0 · Downloads · BsonLite Console · Support development