add debug() for .listen() and .keys=
This commit is contained in:
parent
e447e731b6
commit
309f2ac00e
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,7 @@ Application.prototype.__proto__ = Emitter.prototype;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
app.listen = function(){
|
app.listen = function(){
|
||||||
|
debug('listen');
|
||||||
var server = http.createServer(this.callback());
|
var server = http.createServer(this.callback());
|
||||||
return server.listen.apply(server, arguments);
|
return server.listen.apply(server, arguments);
|
||||||
};
|
};
|
||||||
|
@ -116,6 +117,7 @@ app.callback = function(){
|
||||||
|
|
||||||
app.__defineSetter__('keys', function(keys){
|
app.__defineSetter__('keys', function(keys){
|
||||||
var ok = Array.isArray(keys) || keys instanceof Keygrip;
|
var ok = Array.isArray(keys) || keys instanceof Keygrip;
|
||||||
|
debug('keys %j', keys);
|
||||||
if (!ok) throw new TypeError('app.keys must be an array or Keygrip');
|
if (!ok) throw new TypeError('app.keys must be an array or Keygrip');
|
||||||
if (!(keys instanceof Keygrip)) keys = new Keygrip(keys);
|
if (!(keys instanceof Keygrip)) keys = new Keygrip(keys);
|
||||||
this._keys = keys;
|
this._keys = keys;
|
||||||
|
|
Loading…
Reference in a new issue