With 1.9.x, The Tumblr, Github and Wordpress middleware configs are reliant on the local config json or ENV variable. However, this has already caused problems after forgetting to reset the config json keys to the correct ENV, and the ENV variables not being set caused the next.* app to use the wrong oAuth app.
To fix this, I created 3 json configs, default, next, and dev. The a switch to pull in the correct json config for that environment.
var configJson = '/config/tumblr.json';
app.use('*', function(req, res, next) {
if (req.hostname == 'mammal-charter.codio.io') {
configJson = '/config/tumblr.dev.json';
}
else if (req.hostname == 'next.writeon.io') {
configJson = '/config/tumblr.next.json';
}
});
Needs full testing in Dev and Next before proceeding.
With 1.9.x, The
Tumblr
,Github
andWordpress
middleware configs are reliant on the local config json or ENV variable. However, this has already caused problems after forgetting to reset the config json keys to the correct ENV, and the ENV variables not being set caused the next.* app to use the wrong oAuth app.To fix this, I created 3 json configs, default, next, and dev. The a switch to pull in the correct json config for that environment.
Needs full testing in Dev and Next before proceeding.