basic import functionality; dockerfile fixes; session and cookie handling fixes

This commit is contained in:
Lukas F. Hartmann
2018-03-30 22:34:27 +02:00
18 changed files with 209 additions and 70 deletions

View File

@@ -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();