mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-16 09:57:30 +01:00
basic import functionality; dockerfile fixes; session and cookie handling fixes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const config = require('config');
|
||||
|
||||
// this is a mock version of the Redis API,
|
||||
// emulating Redis if it is not available locally
|
||||
var notRedis = {
|
||||
@@ -92,7 +94,12 @@ var notRedis = {
|
||||
|
||||
module.exports = {
|
||||
connectRedis: function() {
|
||||
this.connection = notRedis;
|
||||
if (config.get("redis_mock")) {
|
||||
this.connection = notRedis;
|
||||
} else {
|
||||
const redisHost = process.env.REDIS_PORT_6379_TCP_ADDR || 'sync';
|
||||
this.connection = new RedisConnection(6379, redisHost);
|
||||
}
|
||||
},
|
||||
getConnection: function() {
|
||||
this.connectRedis();
|
||||
|
||||
Reference in New Issue
Block a user