API - startFSStorageSource
This module is used to save data into the local file system with folders and JSON files, for a given domain.
import startFSStorageSource from "@aven-cloud/cloud-fs/startFSStorageSource";
const source = await startFSStorageSource({
domain: 'mydomain',
dataDir: './myData'
});
The resulting FS storage source conforms to the source API.
Options
`domain` - what domain are we saving data for
`dataDir` - the local directory to save and retrieve the stored files
Careful! You should only run a single server against the data dir. Otherwise observing will break, because and all doc changes are managed by the fs storage source in memory. If you want to run multiple JS servers against a single storage mechanism, use the Postgres Storage Source.