diff --git a/lib/http-proxy.js b/lib/http-proxy.js index 36589b39f..196dded44 100644 --- a/lib/http-proxy.js +++ b/lib/http-proxy.js @@ -1,8 +1,12 @@ var http = require('http'), https = require('https'), url = require('url'), - httpProxy = require('./http-proxy/'), - proxy = exports; + httpProxy = require('./http-proxy/'); + +/** + * Export the the proxy "Server" as the main export + */ +module.exports = httpProxy.Server; /** * Creates the proxy server. @@ -19,23 +23,23 @@ var http = require('http'), * @api public */ -proxy.createProxyServer = proxy.createServer = function createProxyServer(options) { +module.exports.createProxyServer = module.exports.createServer = function createProxyServer(options) { /* * `options` is needed and it must have the following layout: - * - * { - * target : - * forward: - * agent : - * ssl : + * + * { + * target : + * forward: + * agent : + * ssl : * ws : - * xfwd : + * xfwd : * secure : - * } - * - * NOTE: `options.ws` and `options.ssl` are optional. - * `options.target and `options.forward` cannot be - * both missing + * } + * + * NOTE: `options.ws` and `options.ssl` are optional. + * `options.target and `options.forward` cannot be + * both missing * } */