diff --git a/lib/browser-express.js b/lib/browser-express.js index 386e8159..82aba2fa 100644 --- a/lib/browser-express.js +++ b/lib/browser-express.js @@ -1,7 +1,25 @@ module.exports = browserExpress; function browserExpress() { - return {}; + return new BrowserExpress(); } browserExpress.errorHandler = {}; + +function BrowserExpress() { + this.settings = {}; +} + +BrowserExpress.prototype.set = function(key, value) { + if (arguments.length == 1) { + return this.get(key); + } + + this.settings[key] = value; + + return this; // fluent API +}; + +BrowserExpress.prototype.get = function(key) { + return this.settings[key]; +};