Tuesday, 4 April 2017

why app function can calling handle function?

/** * Create a new connect server. * * @return {function} * @public */

function createServer() {

function app(req, res, next){ app.handle(req, res, next); }

  merge(app, proto);
  merge(app, EventEmitter.prototype);
  app.route = '/';
  app.stack = [];
  return app;
}



via ZHONGJIAFENG

No comments:

Post a Comment