laravel-echo-server icon indicating copy to clipboard operation
laravel-echo-server copied to clipboard

Laravel-echo how to change redis port?

Open vdomah opened this issue 5 years ago • 2 comments

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?

vdomah avatar May 21 '19 11:05 vdomah

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

new Echo({
		broadcaster: 'socket.io',
		host: global.socket_url,
		port: 12345,
	},
});

kilvn avatar Sep 02 '19 18:09 kilvn

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

cyberkeiler avatar May 15 '20 09:05 cyberkeiler