When I was playing with Node-RED, a flow management based on Node.js, I discover that I was needing a simple Node to save and retrieve information from simple file.
I then created JsonDB and published it on Npm registry :
You can find the source code on my Github Repository :
Belphemur / node-json-db
A simple "database" that use JSON file for Node.JS.
The module store the data using JavaScript Object directly into a JSON file. You can easily traverse the data to reach directly the interesting property using the DataPath. The principle of DataPath is the same as XMLPath.
Example
{ test: { data1 : { array : ['test','array'] }, data2 : 5 } }
If you want to fet the value of array, the DataPath is /test/data1/array To reach the value of data2 :/test/data2 You can of course get also the full object test : /test Or even the root : /
I’m quite happy with this lib and the Node created for Node-RED
Leave a Reply