I'm trying to work with Socket.io and Django in a project and when I load the socket.io script from the server
<script src="localhost:3000/socket.io/socket.io.js"></script>
<script>
var socket = io();
</script>
I get an error because my Django project is in localhost:8000 so I dont know why the socket.io script is trying to do requests from Django when I said that the socket.io server is in port 3000.
In js console in my browser says
GET http://localhost:8000/socket.io/EIO=3&transport=polling&t=142197415699051 404 (NOT FOUND)
and that should be looking to loacalhost:3000 and not to localhost:8000
My Django log console says:
[22/Jan/2015 18:50:23] "GET /socket.io/?EIO=3&transport=polling&t=1421974222989-62 HTTP/1.1" 404 7506
Obvously because theres not a Django url to answer that request.
How can I load a socket.io server in a Django template???
loacalhost
a typo? – Håken Lidlocalhost:3000/socket.io/socket.io.js
in your browser's url bar to verify that you get the file. – Håken Lid