From 67539519faf1f32073fdb562404bd897072e24ee Mon Sep 17 00:00:00 2001 From: indexzero Date: Sun, 22 Jul 2012 14:27:38 -0400 Subject: [PATCH] [doc] Minor formatting updates to README.md --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2adbf59..6f7e26e 100644 --- a/README.md +++ b/README.md @@ -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() { @@ -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; } //