parent
e7f74f9bbb
commit
1605f33760
2 changed files with 20 additions and 1 deletions
|
@ -72,11 +72,13 @@ app.listen = function(){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return JSON representation.
|
* Return JSON representation.
|
||||||
|
* We only bother showing settings.
|
||||||
*
|
*
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
* @api public
|
* @api public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
app.inspect =
|
||||||
app.toJSON = function(){
|
app.toJSON = function(){
|
||||||
return only(this, [
|
return only(this, [
|
||||||
'subdomainOffset',
|
'subdomainOffset',
|
||||||
|
|
|
@ -13,6 +13,18 @@ var http = require('http');
|
||||||
|
|
||||||
var proto = module.exports = {
|
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.
|
* Return JSON representation.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +40,12 @@ var proto = module.exports = {
|
||||||
toJSON: function(){
|
toJSON: function(){
|
||||||
return {
|
return {
|
||||||
request: this.request.toJSON(),
|
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