Integrating node.js to my existing webpage

HI, correct me If I am wrong please,I am new to node.js,I have an existing webpage that uses ajax to request data to server in shorter time 2 seconds is my default,I want to change this ajax code to node.js,but I am confuse because the node.js will not listen to port 80,my webpage is listening in port 80. how can I apply this node.js code.

Thank you in advance.

Point your page at whichever port Node.js is running on (eg http://yoursite.com:3000) or point a subdomain at that port. (eg http://ajax.yoursite.com) The latter is cleaner, but is more complicated to set up if you don’t already know how.

Thank you for the quick reply,Is this okay if I have this url that listen to port 80

http://localhost/project/dashbaord.php

Then I have my node.js also to listen in port 3000

http://localhost/project/dashbaord.php:3000

Thank you in advance.

Yes, except Node.js is not a .php file. It would be http://localhost:3000

Ok,Thank you I will try this.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.