Skip to content

sciensa/node-red-contrib-lokijs

Repository files navigation

node-red-contrib-lokijs

A Node-Red node for object storage with LokiJS

NodeRed NodeJS ESLint

Currently implemented methods:

  • FIND
  • INSERT

Pre-requisites

Requires Node-Red version 0.16.2 or more recent.

Installation

$ npm i -S node-red-contrib-lokijs

How to use it

By default, the data remains in-memory only, so the filename that is set is only used to instantiate the DB class. If you want to persist the data in the storage you can configure it in the settings.js file:

	lokijs: {
		persistData: true,
		autosaveInterval: 1000,
		callback: function (collection) {
			console.log("Collection loaded");
		}
	}

All this data is optional, and the meaning of each one is:

  • persistData: flag to activate the data persistance. Default value false
  • autosaveInterval: only used when persistData is active. Time interval (in milliseconds) between saves. Default value 4000
  • callback: function that is called when the collection is loaded

Development

1. Clone the project
$ git clone https://github.com/sciensa/node-red-contrib-lokijs.git
2. Go to the project directory
$ cd node-red-contrib-lokijs
3. Install the dependencies
$ npm install
4. Link the project
$ npm link
5. Run the node-red and check the node out

Contributing

  1. Follow the Semantic Versioning Specification.
  2. Follow the GitHub Flow.
  3. Follow the 5 Useful Tips For A Better Commit Message article and the How to Write a Git Commit Message post.
  4. Install and use Commitizen.
  5. Bug reports and pull requests are welcome on GitHub.
  6. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The node is available as open source under the terms of the MIT License.

About

LokiJS node for Node-Red

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •