Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
Socket IO Remote Websocket URL is getting flipped to LocalHost in development

I am working with Socket IO. Yesterday I changed my development tool from Windows to MacOS to continue development.

I have the following code that is working well by opening a Websocket connection to a remote URL as follows:

const socketUrl = "https://api.someapiendpoint.com";
let socketOptions = {transports: ["websocket"]}
let socket;
if (!socket) {
    socket = io(socketUrl, socketOptions);
}

This is all working well on my Windows Machine. However, on my Mac I noticed that socket io is force switching the url back to localhost. This is weird.

As a result I currently cannot test socket io on my Mac.

Any ideas to resolve this would be truly appreciated.

Please note that I am on node

14.19.1
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!