'use strict';

var nconf = require('nconf');

function Config() {
	var environment;

	nconf.argv().env('_');
	environment = nconf.get('NODE:ENV') || 'development';

	nconf.file(environment, 'lib/config/' + environment + '.json');
	nconf.file('default', 'lib/config/default.json');
}

Config.prototype.get = function(key) {
	return nconf.get(key);
};

module.exports = new Config();
