aedes-persistence-nedb
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "aedes-persistence-nedb", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "NeDB persistence for Aedes.", | ||
@@ -5,0 +5,0 @@ "main": "persistence.js", |
@@ -32,2 +32,3 @@ 'use strict'; | ||
self._path = self._options.path || './data'; | ||
self._prefix = (self._options.prefix) ? (self._options.prefix + '.') : ''; | ||
self._ready = { incoming: false, outgoing: false, retained: false, subscriptions: false, wills: false }; | ||
@@ -50,3 +51,3 @@ self.ready = false; | ||
var _name = name; | ||
var filename = Path.join(self._path, _name + '.db'); | ||
var filename = Path.join(self._path, self._prefix + _name + '.db'); | ||
var storage = new NeDB({ | ||
@@ -53,0 +54,0 @@ filename: filename, |
@@ -29,3 +29,4 @@ [![Build Status](https://img.shields.io/travis/ovhemert/aedes-persistence-nedb.svg)](https://travis-ci.org/ovhemert/aedes-persistence-nedb) | ||
var persistence = new NedbPersistence({ | ||
path: './db' // defaults to './data' | ||
path: './db' // defaults to './data', | ||
prefix: 'mqtt' // defaults to '' | ||
}); | ||
@@ -32,0 +33,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42790
1132
60