I've recently been learning about socket.IO.
I've hosted a static directory "Public" using express, and i imported socketio into the index.html.
<script src="../node_modules/socket.io/client-dist/socket.io.js"></script>
The browser will report an error:
GET http://127.0.0.1:3000/node_modules/socket.io/client-dist/socket.io.js net::ERR_ABORTED 404 (Not Found)
But I modified it this way:
<script src="/socket.io/socket.io.js"></script>
It works well!
Here is the folder directory structure
But the Public directory doesn't have any other js files,
So, where does it come from ?