You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to include socket.io.js (client) file into index.html without using CDN. I have put socket.io.js into project's root directory. But when I'm trying to open the chat on browser, I'm getting 404 for that file. Here is my cod to include that file:
<script src="socket.io.js"></script>
File have full permission.
Thanks
The text was updated successfully, but these errors were encountered:
I had the same issue when I was using this along with Express. I was starting the server with app.listen() instead of http.listen(). Once I changed it the 404 error went away.
add this line to the server to start serving static file such as the file socket.io.js :
app.use(express.static([put the path where your static files exists ])).
Hello,
I want to include socket.io.js (client) file into index.html without using CDN. I have put socket.io.js into project's root directory. But when I'm trying to open the chat on browser, I'm getting 404 for that file. Here is my cod to include that file:
<script src="socket.io.js"></script>File have full permission.
Thanks
The text was updated successfully, but these errors were encountered: