Filesystem Node RxStorage (beta)
The Filesystem Node RxStorage for RxDB is built on top of the Node.js Filesystem API.
It stores data in plain json/txt files like any "normal" database does. It is a bit faster compared to the SQLite storage and its setup is less complex.
Using the same database folder in parallel with multiple Node.js processes is supported when you set multiInstance: true
while creating the RxDatabase.
Pros​
Cons​
- It is part of the RxDB Premium 👑 plugin that must be purchased.
Usage​
import {
createRxDatabase
} from 'rxdb';
import {
getRxStorageFilesystemNode
} from 'rxdb-premium/plugins/storage-filesystem-node';
const myRxDatabase = await createRxDatabase({
name: 'exampledb',
storage: getRxStorageFilesystemNode({
basePath: path.join(__dirname, 'my-database-folder'),
/**
* Set inWorker=true if you use this RxStorage
* together with the WebWorker plugin.
*/
inWorker: false
})
});
/* ... */