Importer
This service allows you to import JSON data easily.
#
Features- Import data, under the form of JSON-formatted arrays
- Allow to create different kind of import actions
- The import action will be called once per items in the JSON array
#
Dependencies- None
#
Install#
Usage#
Importing dataStart Moleculer in REPL mode and call the import
action like this:
Any other parameter you give will be passed to the action.
#
Service settingsProperty | Type | Default | Description |
---|---|---|---|
importsDir | string | required | Directory where the JSON files are located |
allowedActions | array | required | List of allowed import actions |
#
Actionsimport
#
#
ParametersProperty | Type | Default | Description |
---|---|---|---|
action | string | required | Name of the action |
fileName | string | required | Name of the file, located in the baseDir directory |
Any other parameter you give will be passed to the action.