You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, very nice lib, I'm using it, works. I need help. Here is what I have, just some debug code that does nothing:
const transformerFunction = function (data, req, res) {
for(var prop in req) {
console.log(prop) // to see if I can tell the query string.
}
//<script src="/reload/reload.js"></script>
let str = data.toString('utf8')
console.log(str)
return Buffer.from( str, 'utf8' )
}
How do I work with buffer?
First I want to ignore anything that is not dealing with html, eg: images and just return.
What is a good way to detect css, images, etc?
Second, if it might be html, I want to append string <script src="/reload/reload.js"></script> to in the middle of the response string. I plan just to use string functions.
I am not worried about performance as this is a dev server.
Do I need to assemble all the buffers somehow into a full body string?
The text was updated successfully, but these errors were encountered:
Hi, very nice lib, I'm using it, works. I need help. Here is what I have, just some debug code that does nothing:
How do I work with buffer?
First I want to ignore anything that is not dealing with html, eg: images and just return.
What is a good way to detect css, images, etc?
Second, if it might be html, I want to append string <script src="/reload/reload.js"></script> to in the middle of the response string. I plan just to use string functions.
I am not worried about performance as this is a dev server.
Do I need to assemble all the buffers somehow into a full body string?
The text was updated successfully, but these errors were encountered: