Express.routes.push(new Route(method, path, fn, options))
}
}
/**
* Set _option_ to _val_. When only _option_ is
* present its current value will be returned.
*
* @param {string} option
* @param {mixed} val
* @return {mixed}
* @api public
*/
exports.set = function(option, val) {
return val === undefined ?
Express.settings[option] :
Express.settings[option] = val
}
/**
* Enable _options_.
*
* @param {string} option
* @api public
*/
exports.enable = function(option) {
set(option, true)
}
/**
* Disable _option_.
*
* @param {string} option
* @api public
*/
exports.disable = function(option) {
set(option, false)
}
/**
* Run Express with the given _host_ and _port_
* or the defaults will be used.
*
* @param {string} host
* @param {int} port
* @api public
*/
exports.run = function() {
Express.server.run()
exports.run = function(host, port) {
Express.server.run(host, port)
}
/**
* Configure _environment_ with _fn_.