Generalize store

This commit is contained in:
John Crepezzi 2011-11-18 18:04:24 -05:00
parent fec02cfead
commit 83b8f3f52d
3 changed files with 24 additions and 14 deletions

View file

@ -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