tlaverdure / laravel-echo-server

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

Laravel-echo how to change redis port? #410

Open vdomah opened 5 years ago

vdomah commented 5 years ago

My laravel-echo-server somewhy is trying to connect to 127.0.0.1:443 instead of 127.0.0.1:6379 - the default for redis. And i don't know where to change this port value. Is 443 autodetected somehow? And how to change it?

kilvn commented 5 years ago

https://github.com/tlaverdure/laravel-echo-server#configurable-options

new Echo({
        broadcaster: 'socket.io',
        host: global.socket_url,
        port: 12345,
    },
});
cyberkeiler commented 4 years ago

The link is correct, but the redis port is set at the server side: You may configure the port as databaseConfig.redis.port in your laravel-echo-server.json or LARAVEL_ECHO_SERVER_REDIS_PORT in your .env, where .env will overwrite the settings in laravel-echo-server.json

In laravel-echo-server.json:

{
  ...
  "database": "redis",
  "databaseConfig": {
    "redis": {
      "port": "6379"
    }
  },
...
}

In .env

will overwrite databaseConfig.redis.port in laravel-echo-server.json

LARAVEL_ECHO_SERVER_REDIS_PORT=6379