diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-10 17:00:40 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-10 17:00:40 -0500 |
| commit | 89e05fb27e1f5d82c970e49307c7712a4c2a2eef (patch) | |
| tree | 57953492e346c3d3f0b8857eaf407b9b99f7cea7 /proxy | |
| parent | e6e86bbccd0e64193805863abd84c23e46136126 (diff) | |
fix cart set_user api
Diffstat (limited to 'proxy')
| -rw-r--r-- | proxy/index.js | 11 |
1 files changed, 10 insertions, 1 deletions
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() |
