Browse files

Updated express submodule

  • Loading branch information...
1 parent 052410c commit e2fa13faf6b6208b34e9c2366ca5086abbf9a58e @tj committed Mar 15, 2011
Showing with 16 additions and 10 deletions.
  1. +15 −9 index.js
  2. +1 −1 support/express
View
24 index.js
@@ -10,21 +10,20 @@
*/
var express = require('express')
- , Server = express.HTTPServer
- ? express.HTTPServer
- : express.Server;
+ , HTTPServer = express.HTTPServer
+ , HTTPSServer = express.HTTPSServer;
// Proxy listen
-var listen = Server.prototype.listen;
+var listen = HTTPServer.prototype.listen;
/**
* Proxy listen() to provide async support.
*
* @api public
*/
-Server.prototype.listen = function(){
+exports.listen = function(){
if (this.__config) {
this.__listen = arguments;
} else {
@@ -34,15 +33,15 @@ Server.prototype.listen = function(){
// Proxy listenFD
-var listenFD = Server.prototype.listenFD;
+var listenFD = HTTPServer.prototype.listenFD;
/**
* Proxy listen() to provide async support.
*
* @api public
*/
-Server.prototype.listenFD = function(){
+exports.listenFD = function(){
if (this.__config) {
this.__listenFD = arguments;
} else {
@@ -52,15 +51,15 @@ Server.prototype.listenFD = function(){
// Proxy configure
-var configure = Server.prototype.configure;
+var configure = HTTPServer.prototype.configure;
/**
* Proxy configure() to provide async support.
*
* @api public
*/
-Server.prototype.configure = function(env, fn){
+exports.configure = function(env, fn){
var self = this;
this.__config = this.__config || 0
@@ -87,3 +86,10 @@ Server.prototype.configure = function(env, fn){
}
return this;
};
+
+// merge
+
+for (var key in exports) {
+ HTTPServer.prototype[key] =
+ HTTPSServer.prototype[key] = exports[key];
+}
2 support/express
@@ -1 +1 @@
-Subproject commit 0d4eaf03fcfc93185ef339e73dd10d2262e07679
+Subproject commit 80f4d08e8b29ea9502d810864cd1393568cba37d

0 comments on commit e2fa13f

Please sign in to comment.