Skip to content

Commit

Permalink
log stream
Browse files Browse the repository at this point in the history
  • Loading branch information
cgawron committed Mar 13, 2024
1 parent d571a07 commit cf3f267
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ app.get('/user', (req, res) => {
});

app.use(`${PREFIX}*`,
(req, res, next) => {
console.log('Res:', res.headers);
res.on('data', (data) => {
console.log('Data:', data);
})
next();
},
proxy(API_URL, {
https: true,
proxyReqPathResolver: function (req) {
Expand All @@ -146,14 +153,8 @@ app.use(`${PREFIX}*`,
console.log('body', srcReq.body);
return proxyReqOpts;
}
}),
(req, res, next) => {
console.log('Res:', res.headers);
res.on('data', (data) => {
console.log('Data:', data);
})
next();
});
})
);

initClient()
.then((_client) => {
Expand Down

0 comments on commit cf3f267

Please sign in to comment.