From 9edc449533072fcdbe0e6c7b8600bf925a4f03c2 Mon Sep 17 00:00:00 2001 From: Gordon Cassie Date: Tue, 26 May 2015 15:30:28 -0400 Subject: [PATCH] Allow configuration for other environments. --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 583fcd9..88a7441 100644 --- a/index.js +++ b/index.js @@ -33,11 +33,12 @@ function successfullyWroteKey(key) { module.exports.postBuild = function(result) { var environment = process.env.EMBER_ENV || 'development'; - if (environment !== 'development') { + var config = require(configPath); + + if (Object.keys(config).indexOf(environment) === -1){ return; } - - var redisConfig = require(configPath)[environment].store; + var redisConfig = config[environment].store; var projectName = this.project.name(); var indexKey = projectName + ":__development__";