How do I pipe file from a external server though localhost (Node.JS)
(Load localhost as if its another site like http://mcom.com)
PC requests http://localhost:80/highres/switch.html
Node Downloads http://mcom.com/highres/switch.html
Then Sends Downloaded File Back to the PC / Client
aka
REQ.URL /highres/switch.html
GET http://mcom.com + req.url
SEND mcom file to localhost request
const scrape = require('website-scraper');
const options = {
urls: ['http://mcom.com/highres/switch.html'],
directory: "./result"
};
scrape(options);
This should work but before you use it type in terminal
npm i website-scraper
This will give you a folder named result and have the html file, if you need more help comment to this post