Allow redistogo

This commit is contained in:
John Crepezzi 2012-09-27 11:46:53 -04:00
commit 4efc5d47d9
3 changed files with 16 additions and 4 deletions

View file

@ -34,8 +34,17 @@ if (!config.storage) {
if (!config.storage.type) {
config.storage.type = 'file';
}
var Store = require('./lib/document_stores/' + config.storage.type);
var preferredStore = new Store(config.storage);
var Store, preferredStore;
if (config.storage.type === 'redistogo') {
var redisClient = require('redis-url').connect(process.env.REDISTOGO_URL);
Store = require('./lib/document_stores/redis');
preferredStore = new Store(config.storage, redisClient);
}
else {
Store = require('./lib/document_stores/' + config.storage.type);
preferredStore = new Store(config.storage);
}
// Compress the static javascript assets
if (config.recompressStaticAssets) {