tlaverdure / laravel-echo-server

Socket.io server for Laravel Echo
MIT License
2.65k stars 510 forks source link

Run multiple laravel-echo-server instance on Local #526

Open smit-devdigital opened 4 years ago

smit-devdigital commented 4 years ago

I setup multiple projects on local which uses laravel-echo-server + redis + socket.io. At a time I can run the only single laravel-echo-server instance in local. If I tried to run multiple laravel-echo-server instance then getting below error:

L A R A V E L  E C H O  S E R V E R

version 1.6.2

⚠ Starting server in DEV mode...

events.js:170
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::6001
    at Server.setupListenHandle [as _listen2] (net.js:1258:14)
    at listenInCluster (net.js:1306:12)
    at Server.listen (net.js:1394:7)

How we can run multiple laravel-echo-server instance on local?

happyDemon commented 4 years ago

@smit-devdigital change the port in your config file, make sure it's unique for every instance you run 😀

silasrm commented 4 years ago

I'm running a docker with laravel-echo-server with a diferent port to any instance.