2014-02-12 00:01:51 +00:00
|
|
|
module.exports = browserExpress;
|
|
|
|
|
|
|
|
function browserExpress() {
|
2014-06-03 08:39:54 +00:00
|
|
|
return new BrowserExpress();
|
2014-02-12 00:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
browserExpress.errorHandler = {};
|
2014-06-03 08:39:54 +00:00
|
|
|
|
|
|
|
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];
|
|
|
|
};
|