From 89e05fb27e1f5d82c970e49307c7712a4c2a2eef Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 10 Nov 2015 17:00:40 -0500 Subject: fix cart set_user api --- proxy/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'proxy') diff --git a/proxy/index.js b/proxy/index.js index 09328ba5..14d5dc63 100644 --- a/proxy/index.js +++ b/proxy/index.js @@ -7,6 +7,8 @@ var url = require('url') var PORT = 9090 var cache = {} +var DEBUG = false + var server = http.createServer().listen(PORT, function(){ console.log('Proxy listening on: http://lvh.me:%s', PORT) }) @@ -49,10 +51,17 @@ server.on('request', function (req, res){ cache[req.url] += s.toString() }) } + if (DEBUG) { + server_res.on('data', function(s){ + console.log( s.toString() ) + }) + } server_res.resume() }) - // req.on('data', function(s){ console.log('>>', s.toString()) }) + if (DEBUG) { + req.on('data', function(s){ console.log('>>', s.toString()) }) + } req.on('error', function(s){ console.log('/!\\ ERROR /!\\'); console.log(s) }) req.pipe(connector) req.resume() -- cgit v1.2.3-70-g09d2