1 year ago

What URI do I need for ioredis to connect to an amazon redis server?

Posted 1 year ago by snotrman

I'm trying to set up a chat application on heroku with redis and, but I can't figure out what uri am I suppose to put on the client side.

All uri's I have tried, give me a 404, name_not_resolved, or timeout erorrs.

I have one heroku app, which is running a node.js buildpack, and all it does is runs the socket.js file.

And I have another php heroku app which has the laravel back end with redis broadcasting and a vue front end.

The broadcasting is set up so that when someone publishes a post or makes a GET request of '/', an event is fired on 'new-post-channell' and 'user-entered-chat-channel' respectively.

I can go into the bash of the socket.js app and run 'node socket.js'. I can see that it connects to heroku's redis addon Amazon server and picks up on the broadcasts.

I can also go into the heroku's redis-cli of the second app, into the monitor mode, and see that broadcasts are being picked up as intended.

It all worked in a vagrant homestead virtual server, but doesn't on heroku.

var socket = io('redis://h:[email protected]');

Please sign in or create an account to participate in this conversation.