Generalize store
This commit is contained in:
parent
fec02cfead
commit
83b8f3f52d
3 changed files with 24 additions and 14 deletions
|
@ -4,11 +4,9 @@ var winston = require('winston');
|
|||
var hashlib = require('hashlib');
|
||||
|
||||
// For storing in files
|
||||
// TODO make data path configurable
|
||||
// TODO make store type configurable
|
||||
|
||||
var FileDocumentStore = function(path) {
|
||||
this.basePath = path;
|
||||
var FileDocumentStore = function(options) {
|
||||
this.basePath = options.path || './data';
|
||||
};
|
||||
|
||||
// Save data in a file, key as md5 - since we don't know what we could be passed here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue