mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-20 02:43:09 -07:00
Allow redistogo
This commit is contained in:
parent
ff8ef54e34
commit
4efc5d47d9
3 changed files with 16 additions and 4 deletions
13
server.js
13
server.js
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue