Skip to content

Instantly share code, notes, and snippets.

@mgechev
Created August 18, 2013 09:23
Show Gist options
  • Select an option

  • Save mgechev/6260728 to your computer and use it in GitHub Desktop.

Select an option

Save mgechev/6260728 to your computer and use it in GitHub Desktop.
Config snippet
App.config = (function () {
var CONFIG = {
port: 8080,
appname: 'foo',
//...
};
return {
getProperty: function (prop) {
prop = prop.toLowerCase();
return CONFIG[prop];
},
getPort: function () {
return Config.port;
}
//...if needed
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment