Skip to content

Commit 6753951

Browse files
committed
[doc] Minor formatting updates to README.md
1 parent 29e6e74 commit 6753951

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

Diff for: README.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,13 @@ Sometimes you want to listen to an event on a proxy. For example, you may want t
224224
var httpProxy = require('http-proxy');
225225

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

228-
var buffer = httpProxy.buffer(req);
229-
230-
proxy.proxyRequest(req, res, {
231-
host: '127.0.0.1',
232-
port: 9000,
233-
buffer: buffer
234-
});
235-
229+
proxy.proxyRequest(req, res, {
230+
host: '127.0.0.1',
231+
port: 9000,
232+
buffer: buffer
233+
});
236234
});
237235

238236
server.proxy.on('end', function() {
@@ -307,11 +305,11 @@ var https = require('https'),
307305
//
308306
// generic function to load the credentials context from disk
309307
//
310-
function getCredentialsContext(cer){
308+
function getCredentialsContext (cer) {
311309
return crypto.createCredentials({
312-
key: fs.readFileSync(path.join(__dirname, 'certs', cer + '.key')),
313-
cert: fs.readFileSync(path.join(__dirname, 'certs', cer + '.crt'))
314-
}).context;
310+
key: fs.readFileSync(path.join(__dirname, 'certs', cer + '.key')),
311+
cert: fs.readFileSync(path.join(__dirname, 'certs', cer + '.crt'))
312+
}).context;
315313
}
316314

317315
//

0 commit comments

Comments
 (0)