Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
I am learning node.js where i am trying to use learn it. I have tried using request and cheerio but i am getting only html page and no any css or js page (if there) and when i click any of its link does not jump to that page it redirect to old page only so how i can redirect it to that link in my localhost only. Is this code is wrong or how i can reach to my goal please need help?
var httpobj = require('http');
var request = require('request');
var cheerio = require('cheerio');
var all_html;
var url = 'http://w3cindia.in'
request(url, function (error, response, html) {
var $page = cheerio.load(html);
all_html = $page("html");
});
httpobj.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(all_html + ' ');
res.end('');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');
Offline
Hi,
sorry I cannot give support for made work LHC in localmode.
You should try online for see if you have the same issue.
Please also consider sometimes you can have issue in make LHC works from local to online,
if you have issue my suggestion is to install directly from online.
Have a great time,
I AM sorry to be unable to help you with this. I can provide only free limited basic support.
PeopleInside - Live helper chat - free limited forum support!
For commercial support or GitHub [see FAQ here]
If you want to support this open source project, just donate [see support page]
Something wrong with the forum? [contact a superhero]
Offline