FeedHenry RainCatcher Simple Store
A CRUDL storage engine that supports both in-memory and $fh.db backends.
Usage
The initial config requires an entity name and the initial seed data:
const Store = persistent: true;const store = 'user';store;
You can additionally utilize the listen
method to have the story listen to conventially-named mediator topics.
const store = 'user';store
$fh.db
API
Peristent Storage using the The persistent storage functionality is provided by the $fh.db
Cloud API. This API is provided by the RHMAP Platform to Cloud Applications.
You have the option to utilize an in-memory version of the store by passing a configuration of {persistent: false}
when requiring this module, this store is intended for quick tests and will lose its contents on application restart.
The general configuration is done via the same environment variables that $fh.db
regularly uses (see documentation link above).
During execution, you can detect if the storage engine being used utilizes a persistent backend via the {store}.isPersistent
property.