IOTDB Transport for Filesystems
npm install iotdb-transport-fs
Stores on the Filesystem. Listens for changes to the Filesystem so this is pretty full featured Might need some tweaks for Windows.
This Transporter writes files to the file system in JSON, and
should be able to detect if someone else writes to them.
* Read more about Transporters
See the samples folder for working examples
Don't forget your subscribes! Most Transporter methods
return RX Observables.
Note that the path to the prefix will be created.
const fs_transport = require("iotdb-transport-fs");
const fs_transporter = fs_transport.make({
prefix: "some-path",
});
fs_transport.put({
id: "light",
band: "ostate",
value: { on: true }
}).subscribe()
You can create a "flat" transporter if you don't want to create
a folder for each thing and aren't interested in multiple bands.
Instead of create a folder, the filename for the Thing will be the JSON data
const fs_transport = require("iotdb-transport-fs");
const fs_transporter = fs_transport.make({
prefix: "some-path",
flat_band: "meta",
});