One file. A lot less setup.
The custom engine, driver and connection lifecycle travel together. Your users don’t install MongoDB.
const BsonLite = require('./BsonLite.cjs');
await BsonLite.connect();
Big ideas shouldn’t need a database installation guide.
Drop BsonLite into your Node
project, connect, and build
an offline Windows app with your data close by.
const BsonLite = require('./BsonLite.cjs');
async function main() {
await BsonLite.connect();
const notes = BsonLite.collection('notes');
// Your application starts here.
}
main().catch(console.error);
Illustrative app preview. BsonLite runs in your Node application.
Spend your time on the thing you’re making.
BsonLite brings the local database pieces together,
so your application can get on with it.
The custom engine, driver and connection lifecycle travel together. Your users don’t install MongoDB.
const BsonLite = require('./BsonLite.cjs');
await BsonLite.connect();
Collections, BSON values, indexes and aggregation. Use familiar syntax within the MongoDB 4.0 profile.
const notes = await BsonLite.collection('notes')
.find({ done: false }).toArray();
Live database files and temporary spills are encrypted by the custom native storage engine.
// Encryption is prepared automatically.
await BsonLite.connect();
BsonLite selects a local port and prepares certificates and credentials behind the scenes.
127.0.0.1automaticmTLS + SCRAMawait BsonLite.connect();
const state = BsonLite.status();
Keep application data in your project’s Database folder. The runtime and protected vault live outside it.
private app data// No server address to configure.
await BsonLite.connect();
Create a password-protected backup of a stopped store, then restore to a new location.
// Close the store before creating a backup.
await BsonLite.disconnect();
Write the MongoDB code you know.
Let BsonLite take care of the local setup.
const users = BsonLite.collection('users');
const makers = await users
.find({ role: 'maker', active: true })
.sort({ name: 1 })
.toArray();
[
{
"name": "Alex",
"role": "maker",
"active": true
},
{
"name": "Maya",
"role": "maker",
"active": true
}
]
Sample records only. Run the code in Node.js with BsonLite connected.
A desktop idea, a local tool, your next prototype.
Give it a database that feels at home.
Keep database access in your trusted main process and build an offline interface around it.
Desktop integrationKeep collections, filters and local records close to the application that uses them.
CRUD operationsStart with a few documents. Add indexes and aggregation as your local workflow develops.
Indexes and queriesTry the working starter, see the port and health response, then connect your own modules.
Get the starterPut the SDK beside the JavaScript you’re already building.
BsonLite.cjs
One awaited call prepares the engine and its secure local connection.
await BsonLite.connect();
Call a collection from your application modules and start working with data.
BsonLite.collection('notes')
Real MongoDB at the heart.
A simpler way into your local app.
BsonLite bundles a custom MongoDB engine with native storage encryption. The wrapper manages connection, backup, migration and shutdown.
Understand the security modelMongoDB 4.0 is end-of-life. This standalone release candidate has a defined compatibility profile and remaining production validation.Read the exact profile
Good documentation belongs beside good code.
Everything you need to understand your next step.
From your first connection to the API details.
Start reading Query libraryCopy CRUD, BSON, index and aggregation examples.
Explore examples SecurityThe protection model, evidence and release limits.
Read the model Source & downloadsThe SDK, matching engine source and component notices.
Explore the buildThe important details,
without a scavenger hunt.
Keep your data close. Give your next idea a little room.
await BsonLite.connect();