I am new to node.js.
I have a node.js tutorial I am trying to integrate into an existing website application.
The node.js tutorial is a simple chat application. The tutorial code works. I can startup the listener by typing the following at a command line:
after I press ENTER I get this:
At the same location as the index.js file is index.html. Which means I can now open a browser and enter the following URL:
This opens the index.html which functions as a chat client. I can open multiple tabs, each one with a URL of localhost:3000, and anything that is typed is received by the other clients, and vice-versa:
So up to that point, I know the index.js and index.html files in conjunction with node.js and the installed modules is enough for a basic chat client to work. And it obviously works.
Now, inside Visual Studio, I open the VERY SAME index.html file and it does not work. The messages do not get sent or broadcast.
In the Developer Tools for Chrome (press F12 key) I see this error in the console:
I need help understanding why I am getting the error and I need help resolving this.