Deploy can't connect client to endpoint
See original GitHub issueIssue Description
Hey, I’m having issues connecting the client to WS when deploying.
I’m using Node + React and for dev I use const client = new Client('ws://localhost:2567');
and works fine
Now I created a droplet in Digital Ocean, created a static build of the client and put it on server under build folder and serve like that:
app.get('*', function (req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});
But when I access it on the browser I get connection failed. I tried localhost and the ip of the droplet but no success, the error on browser console is:
POST http://localhost/matchmake/joinOrCreate/life_room net::ERR_CONNECTION_REFUSED
Anyone know what endpoint or setup should I use to make it work? Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Client deployment failed | Endpoint Protection
Hello,I am using SEP 11.0.6 installed on W2k8 R2. and want to deploy clients trough SEP Management Console. I can search the client...
Read more >Deploy clients to Windows - Configuration Manager
On the Home tab of the ribbon, in the Settings group, select Client Installation Settings, and then select Software Update-Based Client ...
Read more >WCF cannot connect to endpoint after successfully adding ...
1 Answer 1 · 1) Check if the service URL is correct on your configuration files. This includes the protocol. · 2) Disable...
Read more >Troubleshooting Direct Connect - Tanium Documentation
If you are unable to establish an endpoint connection, check the status of the Deploy Direct Connect - Open Session - operating system ......
Read more >Resolve connection issues with API Gateway private ... - AWS
I'm having issues connecting to my Amazon API Gateway private API endpoint that's in Amazon Virtual Private Cloud (Amazon VPC).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You need to find the external ip address that your droplet is accessible with, and substitute it for localhost.
const client = new Client('ws://your-droplet-ip-address');
You should find it somewhere in your digital ocean dashboard.
EDIT: I’m assuming that you aren’t using a domain name that is pointing to your droplet, in which case, you would just use the domain:
const client = new Client('ws://your-domain-name.com');
My error was that I was including the port with the IP of the droplet, removed it and it worked. I’ll close the issue now.
Thanks for the help @wrigggy!