mirror of
https://github.com/seejohnrun/haste-server
synced 2025-07-14 17:13:45 -07:00
Added node modules
This commit is contained in:
parent
ca9d4c18f7
commit
d1e0644a4e
575 changed files with 77900 additions and 6 deletions
47
node_modules/connect/lib/https.js
generated
vendored
Normal file
47
node_modules/connect/lib/https.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
/*!
|
||||
* Connect - HTTPServer
|
||||
* Copyright(c) 2010 Sencha Inc.
|
||||
* Copyright(c) 2011 TJ Holowaychuk
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var HTTPServer = require('./http').Server
|
||||
, https = require('https');
|
||||
|
||||
/**
|
||||
* Initialize a new `Server` with the given
|
||||
*`options` and `middleware`. The HTTPS api
|
||||
* is identical to the [HTTP](http.html) server,
|
||||
* however TLS `options` must be provided before
|
||||
* passing in the optional middleware.
|
||||
*
|
||||
* @params {Object} options
|
||||
* @params {Array} middleawre
|
||||
* @return {Server}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
var Server = exports.Server = function HTTPSServer(options, middleware) {
|
||||
this.stack = [];
|
||||
middleware.forEach(function(fn){
|
||||
this.use(fn);
|
||||
}, this);
|
||||
https.Server.call(this, options, this.handle);
|
||||
};
|
||||
|
||||
/**
|
||||
* Inherit from `http.Server.prototype`.
|
||||
*/
|
||||
|
||||
Server.prototype.__proto__ = https.Server.prototype;
|
||||
|
||||
// mixin HTTPServer methods
|
||||
|
||||
Object.keys(HTTPServer.prototype).forEach(function(method){
|
||||
Server.prototype[method] = HTTPServer.prototype[method];
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue