Hey Denny,
I'm looking for a way to download an entire website content and store it locally in my server so I could serve it later to clients. Something in the line of proxying just that I want the files to be served from my node server and not from the remote server. I've searched for modules that can help me achieve that but have failed to find one.
I've tried downloading entire HTML, like this:
var file = fs.createWriteStream("article.html");
var request = https.get(article.url, function (response)
{
response.pipe(file);
});
this is working for those websites that call their files using the domain e.g domain.com/stylesheet/main.css. This is getting a problem for some websites that call their files using a method. e.g my_domain() + '/stylesheet/main.css'. In this case server is looking on my server and can't retrieve the files so for that I am only getting a plain HTML.
I think the best solution would be if I get the entire website and change those links or if you would suggest me another solution I would really appreciate it.
Thanks
No responses yet.