parent
e7f74f9bbb
commit
1605f33760
2 changed files with 20 additions and 1 deletions
|
@ -72,11 +72,13 @@ app.listen = function(){
|
|||
|
||||
/**
|
||||
* Return JSON representation.
|
||||
* We only bother showing settings.
|
||||
*
|
||||
* @return {Object}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
app.inspect =
|
||||
app.toJSON = function(){
|
||||
return only(this, [
|
||||
'subdomainOffset',
|
||||
|
|
|
@ -13,6 +13,18 @@ var http = require('http');
|
|||
|
||||
var proto = module.exports = {
|
||||
|
||||
/**
|
||||
* util.inspect() implementation, which
|
||||
* just returns the JSON output.
|
||||
*
|
||||
* @return {Object}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
inspect: function(){
|
||||
return this.toJSON();
|
||||
},
|
||||
|
||||
/**
|
||||
* Return JSON representation.
|
||||
*
|
||||
|
@ -28,7 +40,12 @@ var proto = module.exports = {
|
|||
toJSON: function(){
|
||||
return {
|
||||
request: this.request.toJSON(),
|
||||
response: this.response.toJSON()
|
||||
response: this.response.toJSON(),
|
||||
app: this.app.toJSON(),
|
||||
originalUrl: this.originalUrl,
|
||||
req: '<original node req>',
|
||||
res: '<original node res>',
|
||||
socket: '<original node socket>',
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue