Answer the question
In order to leave comments, you need to log in
Why is the socket.io server not working?
I want to use Laravel in conjunction with socket.io (I use laradock).
Here is server.js code
let io = require('socket.io')(6001);
io.on('connect', function (socket) {
console.log('hi');
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js"></script>
<script>
let socket = io('http://localhost:6001')
</script>
let socket = io(':6001')
let socket = io.connect('http://localhost:6001')
let socket = io.connect(':6001')
Answer the question
In order to leave comments, you need to log in
Didn't approach the problem from the right direction. I tried without docker (I also have node.js installed locally) and everything works. Apparently the problem is still somewhere with laradock
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question