-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
var configuration = {}, | ||
util = require('./util.js'); | ||
logger = require('./logUtil.js'), | ||
util = require('./util.js'); | ||
|
||
module.exports.get = function(key) { | ||
if(configuration.hasOwnProperty(key)) { | ||
return configuration[key]; | ||
} | ||
else { | ||
if(util.isEmpty(configuration)) { | ||
console.log(new Date + ' | INTERNAL ERROR | The configuration is not loaded.'); | ||
logger.internalError('The configuration is not loaded.'); | ||
} | ||
else { | ||
console.log(configuration.length); | ||
console.log(new Date + ' | INTERNAL ERROR | The key : \'' + key + '\' should exist in the configuration but does not.'); | ||
logger.internalError('The key : \'' + key + '\' should exist in the configuration but does not.'); | ||
} | ||
return ''; | ||
} | ||
} | ||
|
||
module.exports.loadConfig = function() { | ||
configuration = require('../../configuration.json'); | ||
console.log(new Date + ' | INTERNAL SUCCESS | Configuration succesfully loaded.'); | ||
logger.internalInfo('Configuration succesfully loaded.'); | ||
} |
Oops, something went wrong.