amitshrestha221's avatar

Use ip after using valet.

I am using valet since 7, 8 months. It is working fine. Today, I was about to test socket.io, so i made it listen to port 3000 i.e.


127.0.0.1:3000


But after using valet, my localhost is not accessible. I also tried to access it by using


project.dev:3000


still it is not accessible. By any chance can i access my ip or localhost ??

i tried pinging this is the output.


ping 127.0.0.1:3000

ping: unknown host 127.0.0.1:3000

0 likes
6 replies
amitshrestha221's avatar

@tisuchi i am using ubuntu, forked version of valet.. My valet is working fine, I just don't know how to access my localhost or local IP.

my view file is following :


<script>
        //var socket = io('http://localhost:3000');
        var socket = io('http://127.0.1.1:3000');
        socket.on("test-channel:App\\Events\\EventName", function(message){
            // increase the power everytime we load test route
            $('#power').text(parseInt($('#power').text()) + parseInt(message.data.power));
        });
    </script>



I ran following socket


 node socket.js
Listening on Port 3000



it listens to port 3000 but I'm not being able to ping by following :


ping 127.0.0.1:3000
ping localhost:3000
ping project.dev:3000


shoemoney's avatar

You cant ICMP a port... well atleast I never have but you can use wscat to see if its there. Also lsof

Please or to participate in this conversation.