new FsProvider(opts, schema)
Constructor for the file system provider. This class inherits from Provider.
Each data collection in EntreeJS represents a data provider instance.
A sub directory will be created for every data collection using this provider.
The directories will be placed in the data root specified in the options connStr
argument and
will have the same names as their corresponding collection names.
For usage reference, please refer to Provider documentation.
Options
connStr
{String}Specifies the root directory relative to process.cwd()
. Example:./data
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
opts |
object | Additional options. The only required option is |
|
schema |
object |
<optional> |
Defines the fields of the collection represented by the provider instance. |
- Source: