Mashroom Storage Filestore Provider
Plugin for Mashroom Server, a Microfrontend Integration Platform.
This plugin adds a simple but cluster-safe, JSON based storage provider.
Usage
If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-storage-provider-filestore as dependency.
To activate this provider configure the Mashroom Security plugin like this:
{
"plugins": {
"Mashroom Storage Services": {
"provider": "Mashroom Storage Filestore Provider"
}
}
}
And configure this plugin like this in the Mashroom config file:
{
"plugins": {
"Mashroom Storage Filestore Provider": {
"dataFolder": "/var/mashroom/data/storage",
"checkExternalChangePeriodMs": 2000,
"prettyPrintJson": true
}
}
}
- dataFolder: The shared folder to store the data files. The base for relative paths is the Mashroom config file (Default: ./data/storage)
- checkExternalChangePeriodMs: Check JSON files for external changes after this period. If you set this to a value <= 0 the file timestamp will be checked on every access which will cause a lot of extra I/O and should only be done if the @mashroom/mashroom-memory-cache plugin is present (Default: 2000)
- prettyPrintJson: Pretty print the JSON files to make it human-readable (Default: true)