SIGN IN SIGN UP
2011-03-01 13:53:22 -08:00
/*!
* Express - HTTPSServer
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var connect = require('connect')
, HTTPServer = require('./http')
, https = require('https');
2011-04-26 11:39:09 -07:00
/**
* Expose `HTTPSServer`.
*/
exports = module.exports = HTTPSServer;
/**
* Server proto.
*/
var app = HTTPSServer.prototype;
2011-03-01 13:53:22 -08:00
/**
* Initialize a new `HTTPSServer` with the
* given `options`, and optional `middleware`.
*
* @param {Object} options
* @param {Array} middleware
* @api public
*/
2011-04-26 11:39:09 -07:00
function HTTPSServer(options, middleware){
2011-03-01 13:53:22 -08:00
connect.HTTPSServer.call(this, options, []);
2011-03-01 14:06:53 -08:00
this.init(middleware);
2011-03-01 13:53:22 -08:00
};
/**
* Inherit from `connect.HTTPSServer`.
*/
2011-04-26 11:39:09 -07:00
app.__proto__ = connect.HTTPSServer.prototype;
2011-03-01 13:53:22 -08:00
// mixin HTTPServer methods
Object.keys(HTTPServer.prototype).forEach(function(method){
2011-04-26 11:39:09 -07:00
app[method] = HTTPServer.prototype[method];
2011-03-01 13:53:22 -08:00
});