doc: "storage" for plugins
Massimo Melina committed
Jun 29, 2024 at 10:48 UTC
ff74b6beb2183ed1b1e4a145d525ae506c010ab3
1 file changed
+8
dev-plugins.md
+8
@@ -513,6 +513,14 @@ These files have a special meaning:
513
- `custom.html` file, that works exactly like the main `custom.html`. Even when same section is specified
514
by 2 (or more) files, both contents are appended.
515
516
+## Storage
517
+
518
+Plugins that need to store generated data persistently should put all the files in the "storage" folder that is
519
+automatically created for each plugin. In your plugin you can get this path by reading `api.storageDir`.
520
+
521
+There is a very powerful way to store data, that is by using `api.openDb`. This will automatically create the file
522
+inside the storage folder. For further details please refer to the dedicated documentation.
523
+
524
## Dependencies
525
526
You run vanilla javascript here, in the backend and/or in the browser, so the tools you have for dependencies