\r
var index_src = fs.readFileSync(__dirname + '/index.html.tmpl', FILE_ENCODING);\r
var vars = {\r
- base_path: config.get().http_base_path,\r
+ base_path: config.get().http_base_path || '/kiwi',\r
cache_buster: Math.ceil(Math.random() * 9000).toString(),\r
server_settings: '{}',\r
client_plugins: '[]'\r
if (new_config) {
loaded_config = new_config;
- global.config = new_config[environment];
+ global.config = new_config[environment] || {};
return loaded_config;
} else {
return false;
module.exports.get = function (specific_environment) {
specific_environment = specific_environment || environment;
- return loaded_config[specific_environment];
+ return loaded_config[specific_environment] || {};
};
module.exports.loadConfig = loadConfig;
\ No newline at end of file