2012-01-16 00:52:18 +00:00
|
|
|
/*!
|
|
|
|
|
* Express - HTTPSServer
|
|
|
|
|
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
|
|
|
|
|
* MIT Licensed
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Module dependencies.
|
|
|
|
|
*/
|
|
|
|
|
|
2012-04-21 04:56:40 +00:00
|
|
|
var connect = require( 'connect' )
|
|
|
|
|
, HTTPServer = require( './http' )
|
|
|
|
|
, https = require( 'https' );
|
2012-01-16 00:52:18 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Expose `HTTPSServer`.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
exports = module.exports = HTTPSServer;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Server proto.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
var app = HTTPSServer.prototype;
|
|
|
|
|
|
|
|
|
|
/**
|
2012-04-21 04:56:40 +00:00
|
|
|
* Initialize a new `HTTPSServer` with the
|
2012-01-16 00:52:18 +00:00
|
|
|
* given `options`, and optional `middleware`.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} options
|
|
|
|
|
* @param {Array} middleware
|
|
|
|
|
* @api public
|
|
|
|
|
*/
|
|
|
|
|
|
2012-04-21 04:56:40 +00:00
|
|
|
function HTTPSServer( options, middleware ) {
|
|
|
|
|
connect.HTTPSServer.call( this, options, [] );
|
|
|
|
|
this.init( middleware );
|
|
|
|
|
}
|
|
|
|
|
;
|
2012-01-16 00:52:18 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Inherit from `connect.HTTPSServer`.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
app.__proto__ = connect.HTTPSServer.prototype;
|
|
|
|
|
|
|
|
|
|
// mixin HTTPServer methods
|
|
|
|
|
|
2012-04-21 04:56:40 +00:00
|
|
|
Object.keys( HTTPServer.prototype ).forEach( function ( method ) {
|
|
|
|
|
app[method] = HTTPServer.prototype[method];
|
|
|
|
|
} );
|