Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[doc] Minor formatting updates to README.md
  • Loading branch information
indexzero committed Jul 22, 2012
1 parent 29e6e74 commit 6753951
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions README.md
Expand Up @@ -224,15 +224,13 @@ Sometimes you want to listen to an event on a proxy. For example, you may want t
var httpProxy = require('http-proxy');

var server = httpProxy.createServer(function (req, res, proxy) {
var buffer = httpProxy.buffer(req);

var buffer = httpProxy.buffer(req);

proxy.proxyRequest(req, res, {
host: '127.0.0.1',
port: 9000,
buffer: buffer
});

proxy.proxyRequest(req, res, {
host: '127.0.0.1',
port: 9000,
buffer: buffer
});
});

server.proxy.on('end', function() {
Expand Down Expand Up @@ -307,11 +305,11 @@ var https = require('https'),
//
// generic function to load the credentials context from disk
//
function getCredentialsContext(cer){
function getCredentialsContext (cer) {
return crypto.createCredentials({
key: fs.readFileSync(path.join(__dirname, 'certs', cer + '.key')),
cert: fs.readFileSync(path.join(__dirname, 'certs', cer + '.crt'))
}).context;
key: fs.readFileSync(path.join(__dirname, 'certs', cer + '.key')),
cert: fs.readFileSync(path.join(__dirname, 'certs', cer + '.crt'))
}).context;
}

//
Expand Down

0 comments on commit 6753951

Please sign in to comment.